/* --- Global Styles & Variables --- */
:root {
    --primary-orange: #E8982E;
    --dark-brown: #593C1F;
    --dark-text: #333333;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --grey-text: #555555;
    --border-color: #ddd;
}

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

html {
    scroll-behavior: smooth;
}

body {
    /* These three lines create the sticky footer layout */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    /* The rest of your existing body styles are great */
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

main {
    flex-grow: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    font-weight: 700;
}

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

a:hover {
    color: var(--dark-brown);
}

/* --- Header & Navigation --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(40px);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.15);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(41, 128, 185, 0.1);
}

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

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: 50px;
    margin-right: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: 1px;
}

.tagline {
    font-size: 0.8rem;
    color: var(--grey-text);
}

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

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

.main-nav a {
    color: var(--grey-text);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}


/* --- Hero Section (Homepage) --- */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/public/images/banner-mountain.jpg');
    background-size: cover;
    background-position: center;
    height: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
}

/* --- Services Section (Homepage) --- */
.services {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.services .container {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    flex-basis: 45%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.service-card h3 {
    padding: 20px;
    color: var(--dark-brown);
}

/* --- Qualifications Section (Homepage) --- */
.qualifications {
    padding: 60px 0;
    text-align: center;
    background: var(--white);
}

.qualifications h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark-brown);
}

.qualifications ul {
    list-style: none;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: left;
}

.qualifications li {
    padding: 12px 0 12px 30px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    color: var(--grey-text);
}

.qualifications li::before {
    content: '✓';
    color: var(--primary-orange);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 12px;
}

.qualifications li:last-child {
    border-bottom: none;
}

.cta-button {
    background-color: var(--primary-orange);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--dark-brown);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- Profile Page Specific Styles --- */
.profile-page main {
    background-color: var(--light-bg);
}

.profile-page .page-header-banner {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
}

.profile-page .page-header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* Puts focus more on the person's face */
}

.profile-page .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(248, 249, 250, 0.7), transparent);
}

.profile-page .content-container {
    padding-top: 30px;
    padding-bottom: 60px;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--grey-text);
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: var(--primary-orange);
}

.profile-article {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    margin-top: -120px; /* Pulls the content up over the banner */
    position: relative;
    z-index: 10;
}

.profile-intro {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.profile-intro h1 {
    font-size: 2.5rem;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.profile-intro h1 span {
    font-size: 1.2rem;
    font-weight: 400;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    color: var(--grey-text);
    display: block;
    margin-top: 5px;
}

.profile-intro .titles p {
    font-size: 1rem;
    color: var(--dark-text);
    line-height: 1.5;
}

.story-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--dark-brown);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.story-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-orange);
}

.story-section h3 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 4px solid var(--primary-orange);
}

.story-section p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--grey-text);
}

.story-intro-block {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.story-inline-image {
    flex: 0 0 300px; /* Don't grow, don't shrink, base width 300px */
    width: 600px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    object-fit: cover;
}

.story-intro-text {
    flex: 1;
}

.story-intro-text h3 {
    margin-top: 0;
}


.career-section {
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.career-section h2 {
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 30px;
}

.career-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background-color: var(--light-bg);
    padding: 15px 30px;
    border-radius: 8px;
    color: var(--dark-brown);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.career-cta-button:hover {
    background-color: var(--dark-brown);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.career-cta-button img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}


/* --- Footer --- */
.main-footer {
    background-color: var(--dark-brown);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #f0f0f0;
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-orange);
}

.copyright {
    font-size: 0.8rem;
    color: #ccc;
}

/* --- VOC / Testimonials Section --- */
.voc {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.voc h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark-brown);
}

.voc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    /* THIS IS THE FIX: Changed 'stretch' to 'start' */
    align-items: start; 
}

.voc-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column; 
    transition: box-shadow 0.3s ease, height 0.5s ease-in-out;
    height: 380px; /* Fixed height for collapsed state */
    overflow: hidden; /* Hide overflow content */
}

.voc-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.voc-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.voc-card blockquote {
    border-left: 4px solid var(--primary-orange);
    padding-left: 20px;
    margin: 0 0 20px 0;
    font-size: 1.15rem;
    font-style: normal;
    font-weight: 500;
    color: var(--dark-text);
    height: 70px; /* Fixed height for quote section */
    display: flex;
    align-items: center;
}

.voc-text-wrapper {
    overflow: hidden;
    color: var(--grey-text);
    line-height: 1.8;
    position: relative;
    transition: max-height 0.7s ease-in-out;
    flex-grow: 1;
}

.voc-text-wrapper p {
    margin: 0;
}

/* Collapsed State */
.voc-card[data-state="collapsed"] .voc-text-wrapper {
    max-height: 110px; /* Adjust this value to control how many lines are shown */
}

/* Fade-out effect for collapsed text */
.voc-card[data-state="collapsed"] .voc-text-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, var(--white), transparent);
}

/* Expanded State */
.voc-card[data-state="expanded"] .voc-text-wrapper {
    max-height: none; /* No height restriction for expanded state */
}

.voc-card[data-state="expanded"] {
    height: auto; /* Allow the card to expand to fit content */
    max-height: none; /* No maximum height restriction */
}

.voc-card-footer {
    margin-top: auto; /* Push footer to bottom */
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.voc-author {
    font-weight: bold;
    color: var(--dark-brown);
    font-size: 0.9rem;
    flex-shrink: 1;
}

.voc-toggle {
    background: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevents button text from wrapping */
    flex-shrink: 0; /* Prevents button from shrinking */
}

.voc-toggle:hover {
    background: var(--primary-orange);
    color: var(--white);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-header .container {
        flex-direction: row; /* Keep header in one line */
        flex-wrap: wrap; /* Allow items to wrap if needed */
        justify-content: space-between; /* Space between logo and nav */
    }
    
    .main-nav {
        margin-top: 0; /* Remove top margin */
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .services .container {
        flex-direction: column;
        align-items: center;
    }
    
    .service-card {
        flex-basis: 100%;
        max-width: 400px;
        min-width: 400px;
    }
    
    .profile-article {
        padding: 30px;
        margin-top: -80px;
    }
    
    /* VOC grid for tablets */
    .voc-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .voc-card {
        height: 380px; /* Keep consistent height for collapsed state */
    }
    
    /* Make sure expanded cards can grow as needed */
    .voc-card[data-state="expanded"] {
        height: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav {
        width: 100%;
        margin-top: 10px;
    }
    
    .main-nav ul {
        flex-wrap: wrap; /* Allow items to wrap to new lines */
        justify-content: center; /* Center the items */
        overflow-x: visible; /* Remove horizontal scrolling */
    }
    
    .main-nav li {
        margin: 5px 10px; /* Add vertical margin for wrapped items */
        white-space: normal; /* Allow text wrapping within items */
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .qualifications h2 {
        font-size: 1.8rem;
    }

    /* Profile page responsive */
    .profile-page .page-header-banner {
        height: 250px;
    }
    
    .profile-article {
        margin-top: -60px;
        padding: 20px;
    }

    .profile-intro h1 {
        font-size: 2rem;
    }

    .story-section h2 {
        font-size: 1.8rem;
    }
    
    .story-section h3 {
        font-size: 1.3rem;
    }

    .story-intro-block {
        flex-direction: column;
    }

    .story-inline-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px auto;
    }

    /* VOC grid for mobile */
    .voc-grid {
        grid-template-columns: 1fr;
    }
    
    .voc-card {
        height: 380px;
    }
    
    /* Ensure expanded cards can display all content */
    .voc-card[data-state="expanded"] {
        height: auto;
        max-height: none;
    }
}