/* ========================================
   リセットCSS & 基本設定
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #FF9800;
    --accent-color: #2196F3;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --error-color: #F44336;
    --success-color: #4CAF50;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
}

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

/* =========================================================================
   Header Styles
   ========================================================================= */
.site-header {
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 20px 0;
}

.site-header:hover {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(238, 238, 238, 0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo img {
    height: 60px;
    width: auto;
}

/* --- Desktop Navigation --- */
.main-nav {
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu li a {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    position: relative;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-menu li a span {
    font-size: 12px;
    font-weight: 300;
    opacity: 0.8;
}

.site-header .nav-menu a:hover {
    color: #007BFF;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #007BFF;
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* --- Header Text Color States --- */
.site-header:not(.header-scrolled):hover .mobile-menu-toggle span {
    background: #333 !important;
}

.site-header.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header:not(.header-scrolled):hover {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header:not(.header-scrolled):hover .nav-menu a {
    color: #333 !important;
    text-shadow: none;
}

/* ページトップでは白文字 */
.site-header:not(.header-scrolled) .nav-menu a {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* スクロール後、またはホバー時の文字色 */
.site-header.header-scrolled .nav-menu a {
    color: #333 !important;
    text-shadow: none !important;
}

/* --- Mobile Navigation (Hamburger) --- */
.mobile-menu-toggle {
    display: none; /* Initially hidden on desktop */
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    transition: background-color 0.3s ease;
}

.site-header:not(.header-scrolled) .mobile-menu-toggle span {
    background: white !important;
}

.site-header.header-scrolled .mobile-menu-toggle span,
.site-header .mobile-menu-toggle.is-open span {
    background: #333 !important;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(238, 238, 238, 0.8);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    display: block !important;
}

.mobile-nav-menu {
    list-style: none;
    padding: 20px;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-menu li a {
    text-decoration: none;
    color: #333 !important;
    font-weight: 500;
    font-size: 16px;
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    transition: color 0.3s ease;
}

.mobile-nav-menu li a:hover {
    color: #007BFF !important;
}


/* ========================================
   ヒーローセクション
======================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(139, 195, 74, 0.9)),
                url('assets/solar-panel-bg.jpg') center/cover;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.page-title {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-title i {
    margin-right: 10px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   実績表示
======================================== */
.achievements {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    margin: -40px auto 40px;
    max-width: 800px;
    box-shadow: var(--shadow);
}

.achievement-item {
    text-align: center;
    flex: 1;
}

.achievement-number {
    font-size: 42px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.achievement-number .unit {
    font-size: 20px;
    font-weight: normal;
}

.achievement-label {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

.main-content {
    min-height: calc(100vh - 70px - 200px);
}

/* ========================================
   フォームセクション
======================================== */
.contact-form {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

/* ========================================
   サービス選択カード
======================================== */
.service-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.service-card {
    position: relative;
    cursor: pointer;
}

.service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.service-content {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.service-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.service-card input[type="radio"]:checked + .service-content {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.service-content i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.service-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.service-content p {
    font-size: 12px;
    opacity: 0.8;
}

/* ========================================
   詳細オプション
======================================== */
.detail-options {
    margin-top: 30px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   システムタイプ選択
======================================== */
.system-type-section {
    margin-top: 30px;
    animation: slideDown 0.3s ease-out;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkbox-item:hover {
    background: #E8F5E9;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
}

/* ========================================
   フォーム要素
======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

/* ========================================
   現地調査オプション
======================================== */
.site-survey {
    background: #E8F5E9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.help-text {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 10px;
    margin-left: 30px;
}

/* ========================================
   プライバシーポリシー
======================================== */
.privacy-section {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 5px;
    margin: 30px 0;
}

.privacy-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.privacy-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.privacy-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.privacy-label a:hover {
    text-decoration: underline;
}

/* ========================================
   エラーメッセージ
======================================== */
.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   ボタン
======================================== */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: #E8F5E9;
}

/* ========================================
   ローディング
======================================== */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin-top: 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* ========================================
   成功メッセージ
======================================== */
.success-message {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-message i {
    font-size: 64px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-message h2 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 28px;
}

.success-message p {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.8;
}

.success-message .btn {
    margin-top: 30px;
}

/* =========================================================================
   New Footer Styles
   ========================================================================= */
.site-footer-new {
    background-color: #f8f9fa;
    color: #555;
    padding: 60px 0 20px 0;
    border-top: 1px solid #e9ecef;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-info .footer-logo-img {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.footer-info p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.footer-info .company-name {
    font-weight: bold;
    color: #333;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #007BFF;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #007BFF;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* ========================================
   レスポンシブデザイン
======================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .header-nav {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero-section {
        padding: 60px 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .achievements {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .achievement-number {
        font-size: 36px;
    }
    
    .service-selector {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}