/**
 * インプルーブエナジー ランディングページ専用CSS
 * Version: 1.0.0
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Color Variables */
:root {
    --logo-blue: #1e40af;
    --logo-green: #16a34a;
    --logo-red: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --green-50: #f0fdf4;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.hidden {
    display: none !important;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.header-content {
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.logo {
    height: 48px;
    width: auto;
}

.nav {
    display: none;
    gap: 1.5rem;
}

.nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--logo-blue);
    text-decoration: none;
    transition: all 0.2s;
}

.nav a:hover {
    text-decoration: underline;
}

.desktop-only {
    display: none;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
}

.btn-primary {
    background: var(--logo-blue);
    color: white;
    border-color: var(--logo-blue);
}

.btn-primary:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
}

.btn-outline {
    border: 1px solid var(--logo-blue);
    color: var(--logo-blue);
    background: white;
}

.btn-outline:hover {
    background: var(--logo-blue);
    color: white;
}

.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

/* Hero Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    transition: transform 0.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slide-prev {
    left: 1rem;
}

.slide-next {
    right: 1rem;
}

.slide-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active {
    background: white;
}

/* News Ticker */
.news-ticker {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
}

.news-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.news-badge {
    background: #facc15;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--logo-blue);
    text-align: center;
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

.bg-green-50 {
    background: var(--green-50);
}

.bg-gray-50 {
    background: var(--gray-50);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.card-icon.blue {
    background: rgba(30, 64, 175, 0.1);
    color: var(--logo-blue);
}

.card-icon.green {
    background: rgba(22, 163, 74, 0.1);
    color: var(--logo-green);
}

.card-icon.red {
    background: rgba(220, 38, 38, 0.1);
    color: var(--logo-red);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

/* Three Zeros Section */
.three-zeros {
    background: white;
    padding: 3rem 0;
}

.zero-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--logo-blue);
    text-align: center;
    margin-bottom: 2rem;
}

.zero-highlight {
    font-size: 5rem;
    color: var(--logo-green);
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-block;
    margin: 0 1rem;
}

.feature-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.feature-text {
    flex: 1;
}

.feature-image {
    flex: 1;
    width: 100%;
}

.feature-image img {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--logo-green);
    margin-bottom: 0.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--logo-blue);
    border-bottom: 2px solid #fb923c;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 1rem;
}

.product-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-title.blue {
    color: var(--logo-blue);
}

.product-title.green {
    color: var(--logo-green);
}

.product-title.red {
    color: var(--logo-red);
}

/* News */
.news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.news-image {
    width: 128px;
    height: 96px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.news-date {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--logo-blue);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

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

/* Chat Support */
.chat-button {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--logo-blue);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-button:hover {
    background: #1e3a8a;
}

.chat-popup {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    width: 320px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-200);
}

.chat-image {
    width: 100%;
    border-radius: 0.5rem;
}

.chat-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Modal */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.popup-content {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.popup-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--logo-blue);
}

.popup-close {
    color: var(--gray-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.popup-close:hover {
    background: var(--gray-100);
}

.popup-body {
    padding: 1.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-info h3 {
    margin-bottom: 0.5rem;
}

.footer-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--logo-blue);
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Utility Classes */
.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-700 {
    color: var(--gray-700);
}

.text-blue {
    color: var(--logo-blue);
}

.text-green {
    color: var(--logo-green);
}

.text-red {
    color: var(--logo-red);
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.p-4 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.pt-4 {
    padding-top: 1rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.border {
    border: 1px solid var(--gray-200);
}

.overflow-hidden {
    overflow: hidden;
}

.leading-relaxed {
    line-height: 1.625;
}

.hover\:underline:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-content {
        padding: 0 1.5rem;
    }
    
    .nav {
        display: flex;
    }
    
    .desktop-only {
        display: inline-flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .slider-container {
        height: 600px;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-row {
        flex-direction: row;
        text-align: left;
    }
    
    .feature-row.reverse {
        flex-direction: row-reverse;
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-direction: row;
        gap: 2rem;
    }
    
    .news-item {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 5rem 0;
    }
    
    .zero-title {
        font-size: 3rem;
    }
    
    .zero-highlight {
        font-size: 6rem;
    }
}

@media (max-width: 767px) {
    .feature-row {
        text-align: center;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 150px;
    }
    
    .zero-highlight {
        font-size: 4rem;
        margin: 0 0.5rem;
    }
    
    .zero-title {
        font-size: 1.5rem;
    }
}

/* Contact Form 7 Integration */
.wpcf7-form {
    background: none !important;
    padding: 0 !important;
}

.wpcf7-form .form-group {
    margin-bottom: 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--logo-blue);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wpcf7-form input[type="submit"]:hover {
    background: #1e3a8a;
}

/* Hide Contact Form 7 if not available */
.contact-form-fallback {
    display: block;
}

.wpcf7 ~ .contact-form-fallback {
    display: none;
}