/* ============================
   CSS Variables & Reset
   ============================ */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --background-light: #F8F9FA;
    --white: #FFFFFF;
    --success: #51CF66;
    --warning: #FFD43B;
    --danger: #FF6B6B;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body[lang="en"] {
    font-family: 'Roboto', sans-serif;
}

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

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

ul {
    list-style: none;
}

/* ============================
   Language Selector
   ============================ */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 15px var(--shadow);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.lang-btn:hover {
    background: var(--background-light);
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.lang-btn img {
    width: 24px;
    height: auto;
    border-radius: 3px;
    object-fit: cover;
}

.lang-btn .lang-text {
    display: none;
}

/* Show text on larger screens */
@media (min-width: 768px) {
    .lang-btn .lang-text {
        display: inline;
    }
}

/* ============================
   Container
   ============================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   Navigation
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 999;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 16px;
}

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

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-donate {
    width: 100%;
    background: var(--secondary-color);
    color: var(--white);
    padding: 18px 32px;
    font-size: 18px;
}

.btn-donate:hover {
    background: #3dbdb5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
}

.btn-donate:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

/* ============================
   Hero Section
   ============================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?w=1600');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    margin-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================
   Sections
   ============================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: clamp(16px, 3vw, 18px);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================
   About Section
   ============================ */
.about-section {
    background: var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

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

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.about-image img {
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================
   Impact Section
   ============================ */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.impact-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
}

.impact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.impact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--white);
}

.impact-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.impact-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================
   Donation Section
   ============================ */
.donate-section {
    background: var(--background-light);
}

.donation-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    overflow: hidden;
}

.donation-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

.tab-btn:hover {
    background: var(--background-light);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.donation-card {
    padding: 30px 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.donation-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.donation-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
}

.donation-card .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.donation-card .amount-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

.custom-donation {
    max-width: 500px;
    margin: 0 auto;
}

.custom-donation label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.amount-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.amount-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    font-size: 24px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    transition: var(--transition);
}

.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.input-note {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.donation-info {
    padding: 40px;
    background: var(--background-light);
}

.selected-amount-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
}

.selected-amount {
    font-size: 28px;
    color: var(--primary-color);
}

.secure-note {
    text-align: center;
    margin-top: 15px;
    color: var(--text-light);
    font-size: 14px;
}

.secure-note i {
    color: var(--success);
    margin-right: 5px;
}

.impact-examples {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow);
}

.impact-examples h3 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.example-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: var(--background-light);
}

.example-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.example-item p {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================
   Contact Section
   ============================ */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: var(--background-light);
    border-radius: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px var(--shadow);
}

.contact-item i {
    font-size: 28px;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-social h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================
   Modal
   ============================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    font-size: 28px;
    color: var(--text-dark);
}

.modal-body {
    padding: 40px;
}

.demo-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    border-radius: 10px;
    margin-bottom: 30px;
}

.demo-notice i {
    font-size: 24px;
    color: var(--warning);
    margin-top: 2px;
}

.demo-notice p {
    color: #856404;
    line-height: 1.6;
}

.payment-summary {
    background: var(--background-light);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.payment-summary h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.summary-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stripe-form-demo {
    margin-bottom: 30px;
}

.stripe-form-demo h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-demo-pay {
    width: 100%;
    padding: 18px;
    font-size: 18px;
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        transition: var(--transition);
        box-shadow: 0 5px 20px var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        margin-top: 70px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .donation-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .modal-content {
        margin: 20px;
    }

    .modal-header,
    .modal-body {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tab-content {
        padding: 30px 20px;
    }

    .donation-info {
        padding: 30px 20px;
    }

    .language-selector {
        top: 10px;
        right: 10px;
        padding: 5px;
        gap: 5px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-btn img {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .donation-card .amount {
        font-size: 24px;
    }

    .amount-input {
        font-size: 20px;
    }

    .selected-amount {
        font-size: 24px;
    }
}
