/* --- Global Settings & Variables --- */
:root {
    --primary-color: #0077B6;
    /* G'DAYのブランドカラー (青系) */
    --secondary-color: #FFC300;
    /* アクセントカラー (黄色系) */
    --text-color: #333;
    --light-text-color: #fff;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-heading: 'M PLUS Rounded 1c', sans-serif;
    --container-width: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--background-color);
    padding-top: 80px;
    /* Fixed header height */
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
}

section {
    padding: 80px 20px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.note {
    font-size: 0.8rem;
    color: #777;
    text-align: center;
    margin-top: 1rem;
}

/* --- CTA Button --- */
.unified-cta-button {
    background: #00B900;
    /* LINE Green */
    color: var(--light-text-color);
    padding: 15px 30px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.unified-cta-button i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.unified-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-wrapper {
    text-align: center;
    margin-top: 1rem;
}

.cta-wrapper a {
    text-decoration: none;
}

.cta-wrapper .sub-text {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Header & Hero (Section 1) --- */
.hero {
    background: url('images/hero-background.jpg') no-repeat center center/cover;
    color: var(--light-text-color);
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Neutral semi-transparent overlay */
    z-index: 1;
}

.hero .container,
.hero .main-nav,
.hero .cta-wrapper {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    /* Increased font size */
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    /* Added text shadow */
    animation: fadeIn 1s ease-out forwards;
}

.hero .subtitle {
    font-size: 1.8rem;
    /* Increased font size */
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    /* Added text shadow */
    animation: fadeIn 1s ease-out 0.5s forwards;
    /* Staggered animation */
}

.header-cta .sub-text {
    color: #fff;
    background-color: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 5px;
    display: inline-block;
}

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #fff;
    z-index: 1000;
    transition: background 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav .nav-logo {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-decoration: none;
    font-weight: 800;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.main-nav ul a:hover {
    color: var(--secondary-color);
}

.main-nav .nav-cta {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
}

.main-nav .nav-cta:hover {
    color: #fff;
    opacity: 0.9;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

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


/* --- Empathy (Section 2) --- */
.empathy {
    background-color: #fff;
}

.thought-question-box {
    border: 3px solid var(--primary-color);
    padding: 1rem 2rem;
    display: block;
    width: fit-content;
    margin: 0 auto 2rem;
}


.thought-bubbles-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dialogue-item {
    display: flex;
    align-items: center;
    /* アイコンと吹き出しを中央で揃える */
    gap: 15px;
    max-width: 80%;
    /* 幅を少し広げる */
}

.dialogue-item.align-left {
    align-self: flex-start;
}

.dialogue-item.align-right {
    align-self: flex-end;
}

.dialogue-item.align-right .thought-bubble {
    order: -1;
    /* 吹き出しをアイコンの前に持ってくる */
}

.thought-icon {
    width: 80px;
    /* 少し大きくする */
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    /* 円形にする */
    object-fit: cover;
    /* 画像の比率を保ったままトリミング */
    object-position: top;
    /* 画像の上部を表示 */
}

.thought-bubble {
    background: #eef7ff;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    /* 影をつける */
}

.thought-bubble p {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* 吹き出しのしっぽ */
.thought-bubble::before {
    content: '';
    position: absolute;
    bottom: 15px;
    width: 0;
    height: 0;
    border-style: solid;
}

.dialogue-item.align-left .thought-bubble::before {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent #eef7ff transparent transparent;
}

.dialogue-item.align-right .thought-bubble {
    background-color: #fff7e0;
}

.dialogue-item.align-right .thought-bubble::before {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent #fff7e0;
}

.conclusion-centered {
    background: none;
    justify-content: center;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    margin-top: 2rem;
}

.light-icon {
    width: 40px;
    margin: 0 10px;
}


/* Dialogue styles within empathy section */
.empathy .dialogue-title {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.empathy .dialogue-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empathy .dialogue-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.empathy .dialogue-item.left {
    justify-content: flex-start;
}

.empathy .dialogue-item.right {
    justify-content: flex-end;
}

.empathy .dialogue-icon {
    width: 60px;
    /* Slightly larger for visibility */
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    /* Prevent shrinking */
    border: 2px solid var(--primary-color);
    /* Add a border for definition */
}

.empathy .dialogue-content {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 70%;
    /* Limit bubble width */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.empathy .dialogue-item.left .dialogue-content {
    border-bottom-left-radius: 5px;
    background-color: #eef7ff;
    /* Light blue for left bubble */
}

.empathy .dialogue-item.right .dialogue-content {
    border-bottom-right-radius: 5px;
    background-color: #fff;
    /* White for right bubble */
}

.empathy .dialogue-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
    /* Ensure readability */
}

/* --- Problem & Comparison (Section 3) --- */
.problem .declaration {
    background: var(--card-background);
    padding: 2rem;
    margin: 3rem 0;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.comparison-section {
    margin-top: 4rem;
}

.comparison-section h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    table-layout: fixed;
}

th,
td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

thead th {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

tbody tr td:first-child {
    font-weight: bold;
    text-align: left;
}

tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

.cost-group-header td {
    background-color: #e0e0e0;
    font-weight: bold;
    text-align: left;
}

.total-cost td,
.final-balance td {
    font-weight: bold;
}

.final-balance td {
    font-size: 1.2rem;
}

.final-balance td:first-child {
    font-size: 1rem;
}

.final-balance strong {
    color: var(--primary-color);
}

.final-balance td:nth-child(3) strong,
.difference td:nth-child(3) {
    color: #d9534f;
}

.highlight-point {
    background-color: var(--secondary-color) !important;
    font-weight: bold;
}

.note-ref {
    font-size: 0.7rem;
    vertical-align: super;
}

.notes {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #555;
}

#comparison-chart {
    margin-top: 2rem;
}

td[data-icon] {
    position: relative;
}

td[data-icon]::before {
    content: attr(data-icon);
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.6rem;
    font-weight: 900;
    line-height: 1;
    user-select: none;
}

/* Set transparent colors for the watermark */
td[data-icon="◎"]::before {
    color: rgba(40, 167, 69, 0.3);
}

td[data-icon="○"]::before {
    color: rgba(255, 193, 7, 0.3);
}

td[data-icon="△"]::before {
    color: rgba(108, 117, 125, 0.3);
}

td[data-icon="×"]::before {
    color: rgba(220, 53, 69, 0.3);
}


/* --- Merits (Section 4) --- */
.merits {
    background-color: #eef7ff;
}

.merit-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.merit-cards .card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    flex: 1;
    transition: transform 0.3s, box-shadow 0.3s;
}

.merit-cards .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

/* --- Service Flow (Section 5) --- */
.service {
    background-color: #fff;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* The main blue line */
.timeline::before {
    content: '';
    position: absolute;
    top: 95px;
    /* Starts at the first icon */
    bottom: 115px;
    /* Ends at the last icon */
    left: 40px;
    /* Positioned to the left */
    width: 3px;
    background-color: var(--primary-color);
    z-index: 0;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    /* Reduced space for the line */
    margin-bottom: 50px;
}

.timeline-icon {
    position: absolute;
    left: 40px;
    /* Aligned with the line */
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.timeline-step-label {
    position: absolute;
    left: 40px;
    /* Aligned with the line */
    top: 50%;
    /* Vertically aligned with icon */
    transform: translate(-50%, -180%);
    /* Moved up, closer to icon */
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    background: white;
    padding: 0 10px;
}

.timeline-frame {
    display: flex;
    gap: 20px;
    background: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    align-items: center;
}

.timeline-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

/* --- Profile (Section 6) --- */
.profile {
    background-color: var(--background-color);
}

.profile-content {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 10px var(--secondary-color);
}

.profile-image-container {
    text-align: center;
}

.profile-caption {
    margin-top: 10px;
    font-weight: bold;
}

.profile-text {
    flex: 1;
}

.profile-text h2 {
    text-align: left;
}

/* --- Testimonials (Section 7) --- */
.testimonials {
    background-color: #fff;
}

.testimonial-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.testimonial-card-item {
    flex: 1;
    background: #eef7ff;
    border-radius: 10px;
    padding: 2rem;
}

.testimonial-card-top {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-card-top img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.testimonial-text p {
    font-style: italic;
}

/* --- Pricing (Section 8) --- */
.pricing {
    background-color: var(--background-color);
}

.pricing .section-subtitle {
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

.pricing-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.plan-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.pricing-card h3 {
    color: var(--primary-color);
}

.plan-description {
    font-size: 0.9rem;
    color: #555;
    min-height: 40px;
}

.price {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    margin: 1rem 0 0;
    color: var(--primary-color);
}

.price-section {
    min-height: 110px; /* Set fixed height for alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.currency {
    font-size: 1.2rem;
}

.tax-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: -0.5rem;
}

.cashback {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    min-height: 21.6px; /* Reserve space for alignment */
}

.cashback.placeholder {
    visibility: hidden;
}

.recommend {
    font-weight: bold;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin-top: 1rem;
    color: #555;
    font-size: 0.9rem;
}

.pricing-card ul li {
    margin-bottom: 0.5rem;
}

.pricing-card.recommended {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
    position: relative;
}

.recommend-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}


/* --- FAQ (Section 9) --- */
.faq {
    background-color: #fff;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding: 0 20px 20px 20px;
}

/* --- Closing (Section 10) --- */
.closing {
    background: url('images/closing-background.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    color: var(--text-color);
    text-align: center;
}

.closing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 58, 89, 0.7);
}

.closing .container {
    position: relative;
    z-index: 2;
}

.closing h2 {
    font-size: 2.5rem;
}

.closing p {
    font-size: 1.1rem;
}

.closing strong {
    font-size: 1.5rem;
    display: block;
    margin-top: 1rem;
}

.final-cta {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    padding: 2.5rem;
    border-radius: 10px;
    margin-top: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta h3 {
    color: var(--primary-color);
}

.final-cta .note {
    color: var(--primary-color);
}

.final-cta .cta-wrapper .sub-text {
    color: var(--text-color);
    background: none;
}

/* --- Footer --- */
footer {
    background: var(--text-color);
    color: #ccc;
    text-align: center;
    padding: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h2 {
        font-size: 1.8rem;
    }

    .merit-cards,
    .testimonial-cards {
        flex-direction: column;
    }

    .profile-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-text h2 {
        text-align: center;
    }

    .pricing-cards {
        grid-template-columns: 1fr 1fr;
    }

    .pricing-card.recommended {
        transform: scale(1);
    }

    .timeline::after {
        left: 25px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-icon {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 10px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    /* Responsive nav */
    .main-nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding-top: 80px;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav ul.active {
        right: 0;
    }

    .main-nav ul li {
        margin: 20px;
    }

    .main-nav ul a {
        color: var(--primary-color);
    }

    .hamburger-menu {
        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);
    }

    /* Responsive tables */
    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 10px 8px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .unified-cta-button {
        font-size: 1rem;
        padding: 12px 25px;
    }

    .thought-bubble p {
        font-size: 1rem;
    }

    .thought-icon {
        width: 40px;
        height: 40px;
    }

    .light-icon {
        width: 30px;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-table th {
    font-weight: 800;
}

.support-table td {
    font-size: 0.9rem;
    padding-top: 8px;
    padding-bottom: 8px;
}

.support-table tbody tr td:first-child {
    font-weight: 700;
    text-align: left;
    padding-left: 15px;
}

.inserted-image {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 2rem auto;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}