/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* グリッドレイアウトの基本設定 */
.container {
    display: grid;
    grid-template-columns: minmax(20px, 1fr) repeat(12, minmax(0, 80px)) minmax(20px, 1fr);
    gap: 20px;
    max-width: 100%; /* 1200pxから100%に変更 */
    margin: 0 auto;
}

/* コンテンツ全体の左右余白を設定 */
.content-wrapper {
    grid-column: 2 / span 12; /* 左右の余白を含めた全幅 */
}

@media screen and (max-width: 959px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .content-wrapper {
        grid-column: 1 / -1;
        padding: 0 20px;
    }
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Sticky header */
header.sticky {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.3s ease-in-out;
}

.logo img {
    height: 40px;
}

nav {
    margin-left: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end;
    margin-right: 2rem;
}

nav ul li {
    margin: 0 0.27rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007bff;
}

/* Button styles */
.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-secondary:hover {
    background-color: #007bff;
    color: #fff;
}

@media screen and (max-width: 959px) {
    .cta-buttons {
        margin-top: 1rem;
    }
}

/* ハンバーガーメニューボタン */
.menu-toggle {
    display: none;
}

.menu-button {
    display: none;
}

@media screen and (max-width: 959px) {
    .cta-buttons {
        display: none;
    }

    .menu-button {
        display: block;
        width: 30px;
        height: 30px;
        position: relative;
        cursor: pointer;
        z-index: 1001;
    }

    .bar {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #333;
        position: absolute;
        left: 0;
        transition: all 0.3s;
    }

    .bar:nth-child(1) { top: 0; }
    .bar:nth-child(2) { top: 50%; }
    .bar:nth-child(3) { top: 100%; }

    .menu-toggle:checked + .menu-button .bar:nth-child(1) {
        top: 50%;
        transform: rotate(45deg);
    }

    .menu-toggle:checked + .menu-button .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .menu-button .bar:nth-child(3) {
        top: 50%;
        transform: rotate(-45deg);
    }

    nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        position: fixed;
        top: 0;
        right: -50%;
        width: 50%;
        height: 100vh;
        background-color: #f1f1f1;
        transition: right 0.3s;
        margin: 0;
        padding: 60px 20px 20px;
        overflow-y: auto;
    }

    .menu-toggle:checked ~ nav {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li {
        margin: 10px 0;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        order: -1; /* CTAボタンをナビゲーションの最上部に配置 */
        gap: 10px;
        margin-bottom: 20px;
    }

    .mobile-menu-button {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
}



/* Hero section styles */
.hero {
    grid-column: 1 / -1; /* コンテナの全幅を使用 */
    display: grid;
    grid-template-columns: minmax(20px, 1fr) repeat(12, minmax(0, 80px)) minmax(20px, 1fr);
    gap: 20px;
    padding: 6rem 0 2rem;
    background-image: url('images/hero-bk.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    grid-column: 2 / span 5; /* 左端から2番目のグリッドから開始し、5グリッド分使用 */
    padding: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #007bff;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: #333;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-image {
    grid-column: 8 / span 6; /* 左から8番目のグリッドから開始し、6グリッド分使用 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: scale(1.05);
}

@media screen and (max-width: 959px) {
    .hero {
        padding-top: 100px;
        grid-template-columns: 1fr repeat(10, 1fr) 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
        position: relative;
        z-index: 2;
    }

    .hero-content,
    .hero-image {
        grid-column: 2 / span 10;
    }
}

@media screen and (max-width: 600px) {
    .hero {
        grid-template-columns: 1fr 10fr 1fr;
    }

    .hero-content,
    .hero-image {
        grid-column: 2 / span 1;
    }
}

/* Section styles */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #007bff;
}

/* Features section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    color: #007bff;
}

/* Benefits section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.benefit-item:hover {
    background-color: #e9ecef;
}

.benefit-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.benefit-item h3 {
    margin-bottom: 0.5rem;
    color: #007bff;
}

/* Case studies section */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-item {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-logo {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: bold;
    color: #007bff;
}

/* Pricing section */
.cards {
    display: flex;
    flex-wrap: wrap;
    flex-basis: calc(33.333% - 2rem);
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
}

.pricing-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-header {
    background-color: #d9eafc;
    padding: 2rem;
    text-align: center;
    clip-path: ellipse(120% 100% at 50% 0%);
}

.pricing-item h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

.pricing-item ul {
    list-style: none;
    margin: 2rem 0;
    padding: 0 2rem;
    text-align: left;
    flex-grow: 1;
}

.pricing-item ul li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.pricing-item ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.pricing-item .price {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #28a745;
    position: relative;
}

.pricing-item .price-period {
    font-size: 0.8rem;
    position: absolute;
    bottom: -0.5rem;
    right: 0;
    color: #6c757d;
}

.pricing-item .btn {
    margin: 0 2rem 2rem;
    width: calc(100% - 4rem);
}

@media screen and (max-width: 768px) {
    .cards--flexFive {
        flex-basis: 100%;
    }
}

/* FAQ section */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.faq-question {
    position: relative;
    padding: 1rem 3rem 1rem 1rem;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.faq-question:hover {
    background-color: #f8f8f8;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 1.5rem;
    line-height: 1;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1rem;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 1rem;
}

@media screen and (max-width: 768px) {
    .faq-question {
        padding-right: 2.5rem;
        font-size: 1rem;
    }
    .faq-question::after {
        right: 0.75rem;
        font-size: 1.25rem;
    }
}

/* Blog section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-5px);
}

.blog-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-item h3 {
    padding: 1rem;
    color: #007bff;
}

.blog-item p {
    padding: 0 1rem 1rem;
}

.blog-item .btn {
    margin: 0 1rem 1rem;
}

/* Final CTA section */
#final-cta {
    background-image: url(images/final-cta-bk.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    color: #fff;
    text-align: center;
    padding: 4rem 2rem;
}

#final-cta h2 {
    color: #fff;
    margin-bottom: 1rem;
}

#final-cta p {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#final-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#final-cta .btn {
    min-width: 200px;
}

@media screen and (max-width: 959px) {
    #final-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
        max-width: 300px;
        margin: 0 auto;
    }

    #final-cta .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media screen and (max-width: 480px) {
    #final-cta {
        padding: 3rem 1rem;
    }

    #final-cta h2 {
        font-size: 1.5rem;
    }

    #final-cta p {
        font-size: 0.9rem;
    }

    #final-cta .cta-buttons {
        max-width: 250px;
    }
}

/* Footer styles */
footer {
    grid-column: 1 / -1; /* コンテナの全幅を使用 */
    background-color: #333;
    color: #fff;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列に分割 */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-nav {
    justify-self: start; /* 左寄せ */
}

.footer-nav ul {
    list-style: none;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav ul li a:hover {
    color: #007bff;
}

.social-media {
    justify-self: center;
    display: flex;
    gap: 20px;
}

.social-media a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.social-media a:hover {
    opacity: 0.7;
}

.social-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.newsletter {
    justify-self: end;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter input[type="email"] {
    padding: 0.5rem;
    border-radius: 5px;
    border: none;
}

.copyright {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #aaa;
}

@media screen and (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-nav,
    .social-media,
    .newsletter {
        justify-self: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes slideInFromLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
    animation: slideInFromLeft 0.5s ease-out;
}

@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
    animation: slideInFromRight 0.5s ease-out;
}