/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 300;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* 明示的に高さを設定 */
    padding: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-left: 40px;
}

.top-nav {
    display: flex;
    margin-right: 40px;
}

.top-nav a {
    margin-left: 20px;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s;
    position: relative;
    padding: 5px 0;
}

.top-nav a:hover {
    opacity: 1;
    color: #b3ff00;
}

.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #b3ff00;
    transition: width 0.3s;
}

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

.top-nav a.active {
    opacity: 1;
    color: #b3ff00;
}

/* Main Navigation - 削除 */

/* Hero Content */

/* Home Section Background */
#home {
    background-image: url('../images/Grok Image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: calc(100vh - 120px); /* Ensure full height minus header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.7); /* Semi-transparent overlay */
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 120px); /* Ensure full height minus header/footer */
}

.hero-title {
    font-size: 5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    margin-bottom: 2rem;
    color: #b3ff00;
}

.hero-text {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 3rem;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.hero-buttons .submit-btn {
    display: inline-block;
    text-align: center;
}

.required {
    color: #b3ff00;
}

/* Sections */
.section-content {
    width: 100%;
    max-width: 1200px;
    padding: 100px 20px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 36px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#company .section-title {
    color: #b3ff00;
}

.section-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Company Section */
.company-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.info-item {
    margin: 15px 0;
    padding: 0;
    border: none;
}

.info-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.info-item p {
    font-size: 18px;
}

.company-line {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 5px;
    transition: transform 0.3s, background-color 0.3s;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.1);
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #b3ff00;
}

.service-card p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.8;
}

/* Contact Section */
.contact-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.7;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b3ff00;
}

.submit-btn {
    background-color: transparent;
    color: #fff;
    border: 1px solid #b3ff00;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.submit-btn:hover {
    background-color: #b3ff00;
    color: #1a1a1a;
}

/* Footer */
footer {
    height: 60px; /* 明示的に高さを設定 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.copyright {
    font-size: 14px;
    opacity: 0.7;
}

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    display: flex;
    width: 400%; /* 4つのセクションなので400% */
    height: calc(100vh - 120px); /* ヘッダー(60px) + フッター(60px)の高さを引いた値 */
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-top: 60px; /* ヘッダーの高さ分だけ下げる */
    position: relative;
    overflow: hidden;
}

.horizontal-section {
    width: 25%; /* 4つのセクションなので25% */
    height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* セクション内でスクロール可能に */
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    margin-right: 40px;
    z-index: 1001;
}

.hamburger-icon {
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
    top: 0px;
}

.hamburger-icon span:nth-child(2) {
    top: 9px;
}

.hamburger-icon span:nth-child(3) {
    top: 18px;
}

.hamburger-icon.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
    background: #b3ff00;
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-icon.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
    background: #b3ff00;
}

/* Overlay for mobile menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.open {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .company-info {
        grid-template-columns: 1fr;
    }

    .hero-image {
        width: 100%;
        opacity: 0.7;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-top: 0;
        padding-top: 20px;
        width: 100%;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.2em;
        width: 100%;
    }

    .hero-content {
        padding: 20px 15px;
        min-height: calc(100vh - 120px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .horizontal-scroll-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .horizontal-section {
        width: 100%;
        min-height: calc(100vh - 120px);
        padding: 20px 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    /* Mobile Navigation */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .hamburger-icon {
        width: 25px;
        height: 18px;
    }

    .logo {
        margin-left: 20px;
        font-size: 20px;
    }

    .top-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        margin-right: 0;
        padding: 60px 20px 20px;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .top-nav.open {
        right: 0;
    }

    .top-nav a {
        margin: 15px 0;
        font-size: 18px;
        opacity: 0.8;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .top-nav a::after {
        bottom: 5px;
    }

    .section-content {
        padding: 30px 15px;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Adjust section description for mobile */
    .section-description {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    /* Adjust hero buttons for mobile */
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
        width: 100%;
    }

    .hero-buttons .submit-btn {
        width: 100%;
        padding: 12px 0;
        margin-bottom: 10px;
    }

    /* Adjust contact form for mobile */
    .contact-form {
        width: 90%;
    }

    /* Adjust services grid for mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Adjust footer for mobile */
    footer {
        padding: 0 15px;
    }

    /* Fix iframe in contact section */
    #contact iframe {
        width: 100%;
        max-width: 100%;
        height: 70vh;
    }

    .contact-container {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
        overflow: hidden;
    }

    #contact .section-title {
        margin-bottom: 20px;
        color: #b3ff00;
    }
}