/* Buttons - Flat Design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.05em;
    box-shadow: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark, #007AAF);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}

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

/* Mobile optimizations for buttons */
@media (max-width: 640px) {
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 12px 32px;
        font-size: 1rem;
    }
}

/* Cards - Flat Design */
.card {
    background: var(--color-white);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: none;
    text-align: center;
    transition: border-color 0.2s ease;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--color-primary);
}

/* Decorative elements removed for flat design */
.card::after,
.card::before {
    display: none;
}

.card h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.4rem;
    font-weight: 700;
}

.card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Business Image Cards - New Style */
.business-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: 0;
}

.business-image-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    transition: border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.business-image-card:hover {
    border-color: var(--color-primary);
}

.business-card-header {
    padding: 30px var(--spacing-md);
}

.business-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 2px;
    line-height: 1.5;
}

.business-card-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.business-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.business-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.business-image-card:hover .business-card-image img {
    opacity: 0.95;
}

/* 图片上的文字标签 */
.business-card-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    z-index: 2;
    transition: all 0.3s ease;
}

.business-image-card:hover .business-card-label {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-3px);
}

/* 轮播图文字标签 */
.hero-slide-label {
    position: absolute;
    bottom: 15px;
    left: 20px;
    color: white;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 500;
    z-index: 5;
    /* 继承父元素的opacity，实现同步渐变 */
}

@media (max-width: 768px) {
    .hero-slide-label {
        bottom: 40px;
        left: 20px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

.business-card-footer {
    padding: var(--spacing-md) var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.business-card-description {
    font-size: 0.9rem;
    color: var(--color-text-main);
    line-height: 1.7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.business-card-description .arrow {
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.business-image-card:hover .arrow {
    transform: translateX(5px);
}

/* Responsive */
@media (min-width: 768px) {
    .business-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .business-image-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    /* Featured Card (First Item: Housing) */
    .business-image-grid>div:nth-child(1) {
        grid-column: 1 / span 4;
        margin-bottom: 12px;
    }

    /* Horizontal layout for featured card on desktop */
    .business-image-grid>div:nth-child(1) .business-card-visible {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: 320px;
    }

    .business-image-grid>div:nth-child(1) .business-card-header {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 40px;
    }

    .business-image-grid>div:nth-child(1) .business-card-image {
        grid-column: 2;
        grid-row: 1 / span 2;
        height: 100%;
    }

    .business-image-grid>div:nth-child(1) .business-card-footer {
        grid-column: 1;
        grid-row: 2;
        padding: 0 40px 40px;
        border-top: none;
    }

    /* Bottom 4 cards */
    .business-image-grid>div:nth-child(n+2) {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .business-card-image {
        height: 180px;
    }

    .business-card-title {
        font-size: 1rem;
    }

    .business-card-description {
        font-size: 0.9rem;
    }
}

/* Old Business Cards - Keep for compatibility */
.business-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 320px;
}

.card-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary-light);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s;
}

.business-card:hover .card-number {
    color: var(--color-primary);
    transform: scale(1.1);
}

.business-card h3 {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    min-height: 60px;
}

.business-card p {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.card-link {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    transition: transform 0.3s;
    display: inline-block;
}

.business-card:hover .card-link {
    transform: translateX(5px);
}

/* Section Subtitle */
.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    margin-top: calc(var(--spacing-md) * -1);
}

/* Grids */
.business-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    justify-content: center;
}

@media (min-width: 640px) {
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .business-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ultra-wide screens: show more cards if space allows */
@media (min-width: 1600px) {
    .business-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        max-width: none;
    }
}

/* Mobile optimizations for cards */
@media (max-width: 640px) {
    .business-card {
        min-height: auto;
        padding: var(--spacing-lg);
    }

    .card-number {
        font-size: 2.5rem;
    }

    .business-card h3 {
        font-size: 1.1rem;
        min-height: auto;
    }
}

/* News List - Flat Design */
.news-list {
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: none;
    overflow: hidden;
}

.news-list li {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.3s;
    position: relative;
}

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

.news-list li:hover {
    background-color: var(--color-bg-light);
    padding-left: calc(var(--spacing-xl) + 8px);
}

.news-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.news-list li:hover::before {
    transform: scaleY(1);
}

.news-date {
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
    font-size: 0.95rem;
    min-width: 100px;
}

.news-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.news-text {
    flex: 1;
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s;
}

.news-list li:hover .news-text {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .news-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }

    .news-list li:hover {
        padding-left: var(--spacing-md);
    }

    .news-date {
        min-width: auto;
        font-size: 0.85rem;
    }

    .news-category {
        font-size: 0.75rem;
    }

    .news-text {
        font-size: 0.9rem;
    }
}

/* Infinite Scroll Banner */
.scroll-banner {
    overflow: hidden;
    padding: var(--spacing-lg) 0;
    background-color: var(--color-white);
    white-space: nowrap;
    position: relative;
}

.scroll-track {
    display: inline-flex;
    animation: scroll 40s linear infinite;
}

.scroll-item {
    width: 300px;
    height: 200px;
    margin: 0 var(--spacing-sm);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.scroll-item:hover img {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover */
.scroll-banner:hover .scroll-track {
    animation-play-state: paused;
}

/* Facility Scroll Wrapper - Full Width */
.facility-scroll-wrapper {
    width: 100%;
    overflow: hidden;
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-lg);
    position: relative;
    /* Full width, not constrained by container */
}

.facility-scroll-wrapper::before,
.facility-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.facility-scroll-wrapper::before {
    left: 0;
    background: none;
}

.facility-scroll-wrapper::after {
    right: 0;
    background: none;
}

/* Responsive gradient width */
@media (min-width: 1400px) {

    .facility-scroll-wrapper::before,
    .facility-scroll-wrapper::after {
        width: 200px;
    }
}

.facility-scroll-track {
    display: flex;
    gap: var(--spacing-lg);
    animation: facility-scroll 15s linear infinite;
    /* 默认15秒，JS会根据设施数量动态调整 */
    width: max-content;
    /* Add padding for visual breathing room */
    padding: 0 var(--spacing-xl);
}

.facility-scroll-track .facility-card {
    flex-shrink: 0;
    width: 320px;
}

/* Responsive card width */
@media (min-width: 1400px) {
    .facility-scroll-track .facility-card {
        width: 360px;
    }
}

@keyframes facility-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover */
.facility-scroll-wrapper:hover .facility-scroll-track {
    animation-play-state: paused;
}

@media (max-width: 640px) {
    .facility-scroll-track .facility-card {
        width: 280px;
    }

    .facility-scroll-wrapper::before,
    .facility-scroll-wrapper::after {
        width: 50px;
    }
}

/* 设施数量少时禁用滚动动画，隐藏渐变遮罩 */
.facility-scroll-wrapper.no-scroll::before,
.facility-scroll-wrapper.no-scroll::after {
    display: none;
}

.facility-scroll-wrapper.no-scroll .facility-scroll-track {
    justify-content: center;
}

/* Mobile stacked mode for home/housing facility overview */
.facility-scroll-wrapper.is-mobile-stack {
    overflow: visible;
    padding: var(--spacing-md) 0 0;
}

.facility-scroll-wrapper.is-mobile-stack::before,
.facility-scroll-wrapper.is-mobile-stack::after {
    display: none;
}

.facility-scroll-wrapper.is-mobile-stack .facility-scroll-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0 var(--spacing-sm);
    animation: none !important;
    transform: none !important;
}

.facility-scroll-wrapper.is-mobile-stack .facility-scroll-track .facility-card {
    width: 100%;
    display: block;
}

.facility-scroll-wrapper.is-mobile-stack .facility-image {
    width: 100%;
    height: 110px;
    min-height: 110px;
    background: #f5f6f7;
}

.facility-scroll-wrapper.is-mobile-stack .facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.facility-scroll-wrapper.is-mobile-stack .facility-info {
    padding: 10px 12px 12px;
    text-align: left;
}

.facility-scroll-wrapper.is-mobile-stack .facility-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.35;
}

.facility-scroll-wrapper.is-mobile-stack .facility-location {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.facility-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: border-color 0.2s ease;
    border: 1px solid var(--color-border);
}

.facility-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.facility-card-link:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 3px;
}

.facility-card:hover {
    border-color: var(--color-primary);
}

.facility-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.facility-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.facility-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
}

.facility-info {
    padding: var(--spacing-lg);
}

.philosophy-text {
    font-size: 1.1rem;
    line-height: 2.2;
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0;
    text-align: left;
}

.facility-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.facility-location {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.facility-link {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    transition: transform 0.3s;
}

.facility-card:hover .facility-link {
    transform: translateX(5px);
}

/* Facility Section Background */
.facility {
    background-color: var(--color-bg-light);
}

/* Responsive Facility Grid (Alternative to scroll) */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.facility-grid .facility-card {
    width: 100%;
}

/* Responsive breakpoints for facility grid */
@media (min-width: 640px) {
    .facility-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1400px) {
    .facility-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Recruitment Banner */
.recruitment-banner {
    background: #4A90A4;
    color: var(--color-white);
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.recruitment-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.recruitment-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.recruitment-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.recruitment-text {
    flex: 1;
}

.hero-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    letter-spacing: 0.08em;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.recruitment-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.recruitment-title-en {
    font-size: 1.2rem;
    font-weight: 500;
    margin-left: 12px;
    opacity: 0.95;
}

.recruitment-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.recruitment-description {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.9;
}

.recruitment-action {
    flex-shrink: 0;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.1rem;
}

.btn-large:hover {
    transform: translateY(-4px);
}

/* White button style for use on dark/colored backgrounds (e.g., CTA sections) */
.btn-white,
.recruit-cta .btn-primary.btn-large,
.recruit-cta .btn.btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-white:hover,
.recruit-cta .btn-primary.btn-large:hover,
.recruit-cta .btn.btn-primary:hover {
    background: var(--color-white);
    color: var(--color-primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Ensure readable text on recruitment CTA with primary button styles */
.recruitment-banner .btn-primary.btn-large {
    color: var(--color-white);
}

@media (max-width: 768px) {
    .recruitment-content {
        flex-direction: column;
        text-align: center;
    }

    .recruitment-title {
        font-size: 2rem;
    }

    .recruitment-title-en {
        font-size: 1.1rem;
        margin-left: 10px;
    }

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

    .recruitment-description {
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 14px 36px;
        font-size: 1rem;
    }
}

/* Expandable Business Menu Implementation */
.business-image-grid {
    position: relative;
    /* Context for absolute overlay */
}

.business-image-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* Ensure stacking context */
    z-index: 1;
    background: var(--color-white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Placeholder to keep grid stable when card goes absolute */
.business-card-placeholder {
    visibility: hidden;
    opacity: 0;
}

.business-image-card.expanded {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 500px;
    /* 固定高度，让图片能够占满 */
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    cursor: default;
    display: flex;
    flex-direction: row;
    margin: 0;
    /* Reset margins */
}

.business-expanded-content {
    display: none;
    flex: 1;
    padding: var(--spacing-lg);
    /* Reduced padding from xl */
    background-color: #fafafa;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.business-image-card.expanded .business-expanded-content {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

.business-image-card.expanded .business-card-visible {
    width: 38.2%;
    /* 黄金分割比例 */
    min-width: 280px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0;
    /* 移除内边距，让图片占满 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* 隐藏左边的标题和描述文字 */
.business-image-card.expanded .business-card-header,
.business-image-card.expanded .business-card-footer {
    display: none;
}

.business-image-card.expanded .business-card-image {
    height: 100%;
    /* 占满整个左边区域 */
    width: 100%;
    margin: 0;
    border-radius: 0;
    /* 移除圆角，填满整个区域 */
    overflow: hidden;
}

/* Hide arrow and modify description in expanded view */
.business-image-card.expanded .business-card-description .arrow {
    display: none;
}

/* Close Button */
.close-expanded-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    z-index: 20;
    transition: color 0.3s;
}

.close-expanded-btn:hover {
    color: var(--color-primary);
}

/* Expanded Menu Styling */
.expanded-menu-container {
    padding: var(--spacing-sm);
    /* Reduced padding from md */
    width: 100%;
}

.expanded-menu-header {
    margin-bottom: var(--spacing-lg);
    /* Reduced margin from xl */
    border-bottom: 2px solid var(--color-primary);
    /* Style similar to image 3 */
    padding-bottom: var(--spacing-sm);
}

.expanded-menu-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin: 0;
}

.expanded-menu-header .ja-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.expanded-menu-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md) var(--spacing-lg);
    /* Reduced gap from lg/xl */
}

.expanded-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 700;
    font-size: 1.1rem;
    padding: var(--spacing-xs) 0;
    /* Reduced padding from sm */
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.expanded-link:hover {
    color: var(--color-primary);
    padding-left: 10px;
    border-bottom-color: var(--color-primary);
}

.expanded-link .link-arrow {
    color: var(--color-primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.expanded-link:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

.expanded-link.highlight {
    color: var(--color-primary);
    margin-top: var(--spacing-sm);
    /* Reduced margin from md */
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 10px;
    font-weight: 700;
    border-bottom: none;
}

.expanded-link.highlight:hover {
    background-color: var(--color-bg-light);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive adjustments for Expanded View */
@media (max-width: 900px) {
    .business-image-card.expanded {
        flex-direction: column;
        height: auto;
    }

    .business-image-card.expanded .business-card-visible {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: var(--spacing-md);
        display: none;
        /* Optionally hide the summary part on mobile to save space */
    }

    .business-image-card.expanded .business-expanded-content {
        padding: var(--spacing-md);
    }

    .expanded-menu-header h3 {
        font-size: 1.5rem;
    }

    .expanded-menu-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* Hero Slider (Fade) */
.hero-slider-section {
    position: relative;
    width: 100%;
    /* Desktop: fixed viewport height like mainstream sites */
    height: 75vh;
    min-height: 500px;
    max-height: 850px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.fade-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.fade-slide.active {
    opacity: 1;
}

.fade-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep focus on center of image - most important content usually in center */
    object-position: center center;
}

.fade-slide .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

/* White Text Slide - Philosophy Style (like Daiwa House) */
.fade-slide--text {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hero-text-content {
    width: min(860px, 100%);
    display: grid;
    gap: 22px;
    justify-items: center;
    text-align: center;
}

.hero-text-main {
    font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: 0.15em;
    text-align: center;
    line-height: 1.6;
    width: min(100%, 46rem);
    padding: 0;
    margin: 0;
    /* Subtle fade-in animation for the text */
    opacity: 0;
    animation: heroTextFadeIn 1.2s ease-out 0.3s forwards;
}

.hero-text-description {
    max-width: 46rem;
    margin: 0;
    color: #4b5960;
    font-size: 1.05rem;
    line-height: 1.9;
    letter-spacing: 0.04em;
}

.fade-slide--text.active .hero-text-main {
    opacity: 0;
    animation: heroTextFadeIn 1.2s ease-out 0.3s forwards;
}

@keyframes heroTextFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Dark controls for white background slide */
.hero-slider-section:has(.fade-slide--text.active) .fade-slider-dots .fade-dot {
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-slider-section:has(.fade-slide--text.active) .fade-slider-dots .fade-dot.active {
    background-color: var(--color-primary, #4A90A4);
    box-shadow: 0 2px 8px rgba(74, 144, 164, 0.4);
}

.hero-slider-section:has(.fade-slide--text.active) .fade-slider-prev,
.hero-slider-section:has(.fade-slide--text.active) .fade-slider-next {
    background-color: transparent;
    color: #999;
    box-shadow: none;
}

.hero-slider-section:has(.fade-slide--text.active) .fade-slider-prev:hover,
.hero-slider-section:has(.fade-slide--text.active) .fade-slider-next:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-text-main {
        animation: none;
        opacity: 1;
    }
}

.hero-slide-label {
    position: absolute;
    bottom: 30px;
    left: 40px;
    color: white;
    font-size: 1.5rem;
    font-weight: 500;
    z-index: 5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.fade-slider-prev,
.fade-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    font-size: 1.5rem;
    color: #333;
}

.fade-slider-prev {
    left: 40px;
}

.fade-slider-next {
    right: 40px;
}

.fade-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.fade-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fade-dot.active {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Tablet: Start using aspect-ratio for better image preservation */
@media (max-width: 1024px) {
    .hero-slider-section {
        height: auto;
        min-height: unset;
        max-height: unset;
        /* 16:9 aspect ratio - mainstream standard for hero images */
        aspect-ratio: 16 / 9;
    }
}

/* Mobile: Use taller aspect ratio to show more of the image content */
@media (max-width: 768px) {
    .hero-slider-section {
        /* 4:3 aspect ratio - shows more vertical content on mobile */
        aspect-ratio: 4 / 3;
    }

    .hero-text-content {
        width: min(100%, 34rem);
        gap: 16px;
    }

    .hero-text-description {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .fade-slide img {
        /* On mobile, focus slightly above center for typical hero photos */
        object-position: center 30%;
    }

    .hero-slide-label {
        font-size: 1.1rem;
        bottom: 50px;
        left: 20px;
        right: 20px;
    }

    .fade-slider-prev,
    .fade-slider-next {
        width: 40px;
        height: 40px;
    }

    .fade-slider-prev {
        left: 10px;
    }

    .fade-slider-next {
        right: 10px;
    }
}

/* Small mobile: Even taller ratio for compact screens */
@media (max-width: 480px) {
    .hero-slider-section {
        /* Square-ish ratio for very small screens */
        aspect-ratio: 1 / 1;
        max-height: 400px;
    }

    .hero-text-main {
        font-size: clamp(1.6rem, 8vw, 2rem);
        line-height: 1.5;
    }

    .hero-text-description {
        font-size: 0.9rem;
    }

    .hero-slide-label {
        font-size: 1rem;
        bottom: 40px;
        left: 15px;
        right: 15px;
    }

    .fade-slider-dots {
        bottom: 15px;
        gap: 10px;
    }

    .fade-dot {
        width: 10px;
        height: 10px;
    }
}
