@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Noto+Sans+JP:wght@400;700&display=swap');

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem; /* 固定ヘッダーの高さ分をオフセット */
}

:root {
    --bg-color: #FFFFFF;
    --bg-gray: #F9F9F9;
    --text-color: #333333;
    --primary-color: #0A2E1B; /* Deep Green */
    --accent-color: #D4AF37; /* Gold */
    --white: #FFFFFF;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(to bottom, var(--white), var(--bg-gray));
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

body.fade-out {
    opacity: 0;
}

/* Crowdfunding Page Specifics */
#crowdfunding-hero {
    background: linear-gradient(rgba(10, 46, 27, 0.8), rgba(10, 46, 27, 0.6)), url('images/Gemini_Generated_Image_497nt2497nt2497n.png') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 8rem 0;
}
#crowdfunding-hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}
#crowdfunding-hero p {
    max-width: 700px;
    margin: 1rem auto 0 auto;
    font-size: 1.1rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.detail-item h3 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#our-vision {
    text-align: center;
}
#our-vision p {
    max-width: 800px;
    margin: 0 auto;
}

.social-links-center {
    text-align: center;
    margin-top: 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--primary-color); }

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background-color: var(--accent-color);
    color: var(--white);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-align: center;
}
.btn:hover {
    background-color: #c8a030;
    transform: translateY(-3px);
}

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none; margin: 0; padding: 0; display: flex;
}
.main-nav ul li a {
    padding: 0 1.2rem;
    color: var(--text-color);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* Hero Section */
#hero {
    color: var(--white);
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/product.jpg') no-repeat center center/cover;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
.section {
    padding: 6rem 0;
}
.section-bg-gray { background-color: var(--bg-gray); }

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 4rem;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: center;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem 0;
}

/* Details Section */
#details .container {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center; /* 中央揃え */
    gap: 4rem;
    text-align: center; /* テキストも中央揃え */
}
.details-text { flex-basis: 100%; } /* 幅を100%に */
.details-image { flex-basis: 100%; } /* 幅を100%に */
.details-image img { border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.details-text h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }

/* Impact Section */
.impact-section {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}
.impact-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}
.impact-content > p { /* Direct child <p> */
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

.wfp-logo-wrapper {
    margin-bottom: 2rem;
}
.wfp-logo-wrapper img {
    max-width: 150px;
}

.impact-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
}

.impact-detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
}

.impact-detail-item h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: 0;
}

.large-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    margin: 1rem 0;
}

.impact-counter-wrapper {
    margin-top: 4rem;
}

.impact-counter {
    font-size: 5rem;
    font-weight: 900;
    margin: 1rem 0;
    color: var(--accent-color);
}

/* About Section */
.about-content {
    display: flex; align-items: center; gap: 4rem;
}
.about-image { flex-basis: 40%; }
.about-text { flex-basis: 60%; }
.about-text h2 { font-size: 2.5rem; }

/* Shop Section */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.product-card {
    text-align: center;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: auto; }
.product-info { padding: 1.5rem; }
.product-card h3 { font-size: 1.5rem; }
.product-price { font-size: 1.2rem; font-weight: bold; margin: 0.5rem 0 1.5rem 0; }
.coming-soon { font-size: 1.2rem; font-weight: bold; margin: 0.5rem 0 1.5rem 0; color: #999; }

/* Language Switcher */
.lang-switcher-wrapper {
    margin-left: 1rem;
}
#lang-switcher {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
}
#lang-switcher:hover {
    background: var(--primary-color);
    color: var(--white);
}

@media (max-width: 768px) {
    .lang-switcher-wrapper {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Footer */
.main-footer-bottom {
    background-color: #333;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}
.main-footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.social-links a { margin: 0 0.7rem; color: var(--white); }

/* Mission Section */
.mission-container {
    text-align: center;
}

.mission-image-wrapper {
    position: relative;
    margin-bottom: 3rem;
    display: inline-block; /* to wrap the image size */
}

.mission-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    border-radius: 10px;
}

.mission-image-wrapper img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block; /* removes bottom space */
    max-width: 100%;
}

.mission-statement {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    width: 80%;
    z-index: 2; /* Ensure text is above the overlay */
}

.mission-statement p {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem; /* Adjust as needed */
    font-weight: 900;
    line-height: 1.4;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.mission-description {
    max-width: 800px;
    margin: 0 auto;
}

.mission-description h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2, .section-title { font-size: 2.2rem; }

    .main-nav { flex-direction: column; }
    .main-nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-nav ul li {
        margin: 0.2rem;
    }
    .main-nav ul li a {
        padding: 0 0.6rem; /* パディングも少し詰める */
        font-size: 0.9rem;
    }

    #details .container, .about-content { flex-direction: column; text-align: center; }

    .mission-statement p {
        font-size: 1.8rem;
    }
    .mission-description h2 {
        font-size: 2rem;
    }

    .main-footer-bottom .container { flex-direction: column; }
    .social-links { margin-top: 1rem; }
}

/* Smartphone Responsive */
@media (max-width: 480px) {
    .section {
        padding: 4rem 0;
    }

    #hero {
        height: 80vh; /* 少し高さを抑える */
    }

    .hero-content h1 {
        font-size: 2.2rem; /* h1をさらに小さく */
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem; /* セクションタイトルも調整 */
        margin-bottom: 3rem;
    }

    .mission-statement p {
        font-size: 1.5rem; /* 画像上のテキストを調整 */
    }

    .large-text {
        font-size: 3rem; /* WFPセクションの大きなテキスト */
    }

    .impact-counter {
        font-size: 4rem; /* カウンターのテキスト */
    }
}

#refill-count {
    position: relative;
    text-align: center;
    background: url('images/Gemini_Generated_Image_kxmv3vkxmv3vkxmv.png') no-repeat center center/cover;
    color: var(--primary-color); /* テキストの色を濃くして読みやすくする */
}

#refill-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8); /* 白いオーバーレイ */
    z-index: 1;
}

#refill-count .container {
    position: relative;
    z-index: 2;
}

.progress-bar-container {
    width: 80%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 20px auto;
}

.progress-bar {
    width: 0%;
    height: 30px;
    background-color: #4caf50;
    border-radius: 5px;
    text-align: center;
    line-height: 30px;
    color: white;
    transition: width 0.5s ease-in-out;
}

#refill-count-display {
    font-weight: bold;
}

#refill-button {
    margin-top: 20px;
}

#funding-progress {
    text-align: center;
}

.funding-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.funding-stats .large-text {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Initially hidden */
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: 1rem;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav ul {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    text-align: center;
}

.mobile-nav ul li {
    padding: 1rem 0;
}

.mobile-nav ul li a {
    color: var(--text-color);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
}

.nav-right {
    display: flex;
    align-items: center;
}

.desktop-nav {
    display: none;
}

.hamburger-menu {
    display: block;
}
