/* Main Stylesheet for Plus Alpha */
:root {
    --primary-color: #005BAC;
    --primary-dark: #003d7a;
    --accent-color: #00d2ff;
    --text-color: #333;
    --text-light: #f4f4f4;
    --bg-color: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(0, 91, 172, 0.15);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
    overflow-y: auto;
    /* Force scroll */
    min-height: 100vh;
    height: auto;
}

/* Emergency fix for visibility */
/* Emergency fix for visibility */
.fade-in,
.fade-in-up {
    opacity: 1 !important;
    /* Force visible by default */
    transform: none !important;
}

/* Allow JS to handle animation if it works, but default is visible */
.fade-in.js-active,
.fade-in-up.js-active {
    opacity: 0 !important;
    /* Only hide if JS explicitly says so */
}

.fade-in.js-active.visible,
.fade-in-up.js-active.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Services Section */
.services-section {
    padding: 20px 0;
    /* Reduced from 40px */
    background: #fff;
    text-align: center;
}

/* News Section */
.news-section {
    padding: 20px 0;
    /* Reduced from 40px */
    background: white;
}

/* Solar Highlights Section */
.solar-highlights-section {
    padding: 20px 0;
    /* Reduced to minimum */
    background-color: #fcfcfc;
    border-top: 1px solid #eee;
}

/* Mobile Menu Fix */
.menu-toggle {
    display: none;
    /* Hidden by default on desktop */
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    margin-bottom: 3rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 91, 172, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 91, 172, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* WordPress Admin Bar Fix */
body.admin-bar .glass-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .glass-header {
        top: 46px;
    }
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Added subtle shadow */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    /* Slightly larger */
    font-weight: 800;
    /* Bolder */
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo .highlight {
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    /* More space */
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.5px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    /* overflow: hidden; Removed to prevent scroll locking issues */
    /* Enhanced Gradient for more depth */
    background: radial-gradient(circle at 70% 30%, #eef7ff 0%, #ffffff 50%, #e6f0fa 100%);
}

/* ... existing styles ... */

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Ensure clicks pass through */
}

canvas#hero-canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Double check to ensure no scroll blocking */
}

.hero-content {
    z-index: 2;
    max-width: 1000px;
    /* Wider canvas for text */
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1.05;
    margin-bottom: 2rem;
    color: #111;
    letter-spacing: -0.03em;
    font-weight: 800;
    text-shadow: 0 4px 30px rgba(0, 91, 172, 0.1);
}

/* Sub-page Header */
.page-header {
    position: relative;
    height: 40vh;
    /* Shorter than main hero */
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 70% 30%, #eef7ff 0%, #ffffff 50%, #e6f0fa 100%);
    overflow: hidden;
    margin-bottom: 40px;
}

.page-header-content {
    z-index: 2;
    text-align: center;
    position: relative;
}

.page-header-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-header-content p {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
}


.hero-content h1 .text-gradient {
    display: inline-block;
    background: linear-gradient(135deg, #005BAC 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 10px;
    /* Prevent descender clipping */
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    /* Responsive subtext */
    margin-bottom: 3.5rem;
    color: #444;
    font-weight: 500;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background: #fff;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 91, 172, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 91, 172, 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e6f3ff, #f0f9ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: all 0.4s ease;
}

.service-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: #fff;
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* Company Section */
.company-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #fff 0%, #f0f7ff 100%);
}

.company-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 50px;
    border: 1px solid white;
    box-shadow: var(--card-shadow);
}

.company-info {
    flex: 1;
    min-width: 300px;
}

.company-list dt {
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
    font-size: 0.9rem;
}

.company-list dd {
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.company-map {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background-color: #ddd;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef;
    color: #99a;
    font-weight: 700;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    /* Reduced from 100px */
    text-align: center;
    background: url('https://images.unsplash.com/photo-1557683316-973673baf926?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    position: relative;
    color: white;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 91, 172, 0.9), rgba(0, 50, 100, 0.9));
}

.contact-inner {
    position: relative;
    z-index: 1;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.btn-large {
    padding: 15px 50px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #002a50;
    color: #aab;
    padding: 30px 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

/* Animation Classes */
.fade-in-up {
    /* opacity: 0; */
    opacity: 1 !important;
    /* Force visible */
    /* transform: translateY(30px); */
    transform: none !important;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1 !important;
    transform: translateY(0);
}

.fade-in {
    /* opacity: 0; */
    opacity: 1 !important;
    /* Force visible */
    transition: opacity 1s ease-out;
}

.fade-in.visible {
    opacity: 1 !important;
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* News Section Styles Correction */
.news-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.news-list {
    list-style: none;
    margin-top: 30px;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.news-item:hover {
    background-color: #f9fcff;
    padding-left: 10px;
}

.news-date {
    font-family: var(--font-heading);
    color: #999;
    margin-right: 20px;
    font-size: 0.9rem;
}

.news-cat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #eef7ff;
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-right: 20px;
    font-weight: 700;
}

.news-title {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(240, 245, 255, 1));
}

.background-animation::before,
.background-animation::after {
    content: '';
    position: absolute;
    width: 100vmax;
    height: 100vmax;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 91, 172, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 10s infinite alternate;
}

.background-animation::after {
    width: 80vmax;
    height: 80vmax;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.03) 0%, transparent 60%);
    animation-delay: -5s;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Media Query Updates */
@media (max-width: 768px) {

    /* Mobile Navigation */
    .menu-toggle {
        display: block !important;
        /* Force show on mobile */
        z-index: 10001;
        cursor: pointer;
        position: relative;
        /* Ensure it respects z-index */
        color: var(--primary-color);
        /* Ensure visible against white header */
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hide off-screen */
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        /* Space between links */
        transition: right 0.4s ease;
        z-index: 1000;
    }

    nav.active ul {
        right: 0;
        /* Slide in */
    }

    nav ul li a {
        font-size: 1.5rem;
        /* Larger font for mobile */
        color: var(--text-color) !important;
        /* Force visibility */
    }

    /* Force content visibility on mobile in case JS observer fails */
    .fade-in-up,
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Ensure Header doesn't block content */
    .glass-header {
        padding: 10px 0;
    }

    /* Hero adjustments */
    .hero-content h1 {
        font-size: 2.5rem;
        /* Explicit mobile size */
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* News adjustments */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-date,
    .news-cat {
        margin-bottom: 5px;
    }
}

/* Company Section */
.company-section {
    padding: 20px 0;
    /* Reduced to minimum */
    background: linear-gradient(180deg, #fff 0%, #f0f7ff 100%);
}

/* Solar Highlights Section */
.solar-highlights-section {
    padding: 40px 0;
    /* Reduced from 50px */
    background-color: #fcfcfc;
    border-top: 1px solid #eee;
}

.highlights-header {
    text-align: center;
    margin-bottom: 50px;
}

.solar-strengths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.strength-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    border-top: 4px solid var(--accent-color);
}

.strength-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0, 91, 172, 0.1);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.strength-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.solar-cases {
    background: white;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eee;
    max-width: 900px;
    margin: 0 auto;
}

.solar-cases h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.case-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.case-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.case-list i {
    color: var(--primary-color);
}

.annotation {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 15px;
}

.factory-section {
    padding: 80px 0;
    background: white;
}

.factory-container {
    background: linear-gradient(135deg, #001f3f, #003366);
    color: white;
    border-radius: 20px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.factory-content {
    flex: 1;
    min-width: 300px;
}

.factory-label {
    background: #00d2ff;
    color: #001f3f;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

.factory-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
}

.factory-desc {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.factory-note {
    font-size: 1rem;
    color: #00d2ff;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
    border: 2px solid white;
}

/* End of main.css */

/* ============================================
   CRITICAL FIXES - Scroll, Canvas, Contact Form
   ============================================ */

/* 1. Force scroll - Override WordPress theme (TCD Genesis etc.) */
html,
html body,
body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    position: static !important;
}

/* Prevent any fixed overlay from blocking scroll */
#hero-canvas,
canvas {
    pointer-events: none !important;
}

/* Hero visual container should not block interaction */
.hero-visual {
    position: relative;
    pointer-events: none;
}

.hero-visual canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
}

/* 2. Contact Form Fix (CF7 on dark background) */
.contact-section {
    background: linear-gradient(135deg, #001f3f, #003d7a) !important;
    color: white;
    padding: 60px 0;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background: linear-gradient(to right, #00d2ff, #ffffff);
}

.contact-section p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 16px !important;
    padding: 2.5rem !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* CF7 Form Labels - Force visible */
.contact-form-wrapper label,
.contact-form-wrapper .wpcf7-form label {
    color: #333 !important;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 8px;
}

/* CF7 Input Fields */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper input[type="url"],
.contact-form-wrapper textarea,
.contact-form-wrapper select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: var(--font-body) !important;
    background: #fff !important;
    color: #333 !important;
    transition: border-color 0.3s ease !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
}

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.15) !important;
}

/* CF7 Checkbox fix */
.contact-form-wrapper .wpcf7-checkbox,
.contact-form-wrapper .wpcf7-acceptance {
    color: #333 !important;
}

.contact-form-wrapper .wpcf7-checkbox label,
.contact-form-wrapper .wpcf7-list-item label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: #333 !important;
    font-weight: 400;
    margin-bottom: 8px;
}

/* CF7 Submit Button */
.contact-form-wrapper input[type="submit"],
.wpcf7 input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    color: white !important;
    border: none !important;
    padding: 14px 40px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: block !important;
    margin: 24px auto 0 !important;
    width: auto !important;
    min-width: 200px;
}

.contact-form-wrapper input[type="submit"]:hover,
.wpcf7 input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 91, 172, 0.4) !important;
}

/* CF7 Error/Response message */
.wpcf7-response-output {
    border-radius: 8px !important;
    padding: 12px !important;
    margin-top: 16px !important;
}

/* CF7 form rows layout */
.contact-form-wrapper .wpcf7-form p {
    margin-bottom: 8px;
    color: #333;
}

/* Page Header for sub-pages */
.page-header {
    position: relative;
    min-height: 250px;
    background: linear-gradient(135deg, #001f3f, #003d7a);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header-content p {
    font-size: 1rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 3px;
}