/* =====================================================
   About Page — 視差互動與 RWD 優化
   依照 UIUX_STANDARDS.md V2 全站 CSS 變數規範
   ===================================================== */

/* --- Hero Section (視差容器) --- */
.about-hero {
    height: 420px;
    width: 100%;
    background-image: url('/assets/images/space/space-lobby.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 桌機視差；JS 會在手機版切換為 scroll */
    position: relative;
    overflow: hidden;
}

.about-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
}

/* --- 浮卡容器 --- */
.brand-card-wrapper {
    max-width: 1000px;
    margin: -100px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.brand-card {
    background: var(--bg-surface, #fff);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.brand-slogan {
    color: var(--color-primary, #AA9177);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.brand-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--text-primary, #3C3A38);
    line-height: 1.4;
}

.brand-desc {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--text-secondary, #7B7874);
    line-height: 1.8;
}

/* 品牌金按鈕（全站 CTA 按鈕，替代 inline style） */
.btn-primary-gold {
    background-color: var(--color-primary, #AA9177);
    border-color: var(--color-primary, #AA9177);
    color: #fff;
}

.btn-primary-gold:hover,
.btn-primary-gold:focus {
    background-color: var(--color-primary-dark, #8A725A);
    border-color: var(--color-primary-dark, #8A725A);
    color: #fff;
}

/* --- Content Container --- */
.content-container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

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

.section-header h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 2rem;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    color: var(--text-primary, #3C3A38);
}

.section-header h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--color-primary, #AA9177);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Core Values Grid --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

/* 骨架屏初始狀態
   value-card：opacity + transform 雙重淡入
   team-card：僅 opacity（transform 由 JS parallax 全權管理，避免衝突） */
.value-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.team-card {
    opacity: 0;
    transition: opacity 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* JS 加上 revealed class 後顯示 */
.value-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.team-card.revealed {
    opacity: 1;
}

.value-card {
    background: var(--bg-surface, #fff);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color, #EAE9E8);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary, #AA9177);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.value-card:hover::before {
    transform: scaleX(1);
}

.value-card:hover {
    box-shadow: 0 10px 30px rgba(170, 145, 119, 0.15);
    border-color: var(--color-primary, #AA9177);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: var(--color-primary-light, #F9F8F6);
    color: var(--color-primary, #AA9177);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    transition: background 0.3s, color 0.3s;
}

.value-card:hover .value-icon {
    background: var(--color-primary, #AA9177);
    color: #fff;
}

.value-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary, #3C3A38);
    font-weight: 600;
}

.value-text {
    color: var(--text-secondary, #7B7874);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Brand Story Quote --- */
.story-quote {
    border-left: 3px solid var(--color-primary, #AA9177);
    padding: 14px 20px;
    margin: 20px 0;
    background: var(--color-primary-light, #F9F8F6);
    border-radius: 0 8px 8px 0;
    font-family: 'Noto Serif TC', serif;
    font-size: 1rem;
    color: var(--text-primary, #3C3A38);
    line-height: 1.7;
    font-style: normal;
}

/* --- Brand Story --- */
.story-section {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
    background: var(--bg-surface, #fff);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.story-img-box {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
}

.story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-img-box:hover .story-img {
    transform: scale(1.04);
}

.story-content {
    flex: 1;
}

.story-content h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary, #3C3A38);
}

.story-content p {
    color: var(--text-secondary, #7B7874);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* --- Team Section --- */
.team-section {
    margin-bottom: 80px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--bg-surface, #fff);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border-color, #EAE9E8);
    cursor: default;
    will-change: transform; /* 視差效能優化 */
    transition: opacity 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    /* transform 由 JS 控制，不放在這裡 */
}

.team-card:hover {
    box-shadow: 0 12px 32px rgba(170, 145, 119, 0.15);
    border-color: var(--color-primary, #AA9177);
}

.team-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary, #AA9177), var(--color-primary-dark, #8A725A));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.team-card:hover .team-avatar {
    transform: scale(1.1);
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #3C3A38);
    margin-bottom: 6px;
}

.team-role {
    font-size: 0.875rem;
    color: var(--color-primary, #AA9177);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}

.team-desc {
    font-size: 0.875rem;
    color: var(--text-secondary, #7B7874);
    line-height: 1.6;
    margin: 0;
}

.team-contact {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--color-primary, #AA9177);
    text-decoration: none;
    border-bottom: 1px solid rgba(170,145,119,0.4);
    transition: color 0.2s, border-color 0.2s;
}
.team-contact:hover {
    color: var(--tech-gold-dark, #8A725A);
    border-bottom-color: var(--tech-gold-dark, #8A725A);
}

/* --- 全寬垂直堆疊人物卡 --- */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.team-profile-card {
    display: flex;
    align-items: flex-start;
    gap: 36px;
    background: var(--bg-surface, #fff);
    border-radius: 20px;
    padding: 36px;
    border: 1px solid var(--border-color, #EAE9E8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.team-profile-card:hover {
    box-shadow: 0 10px 32px rgba(170, 145, 119, 0.13);
    border-color: var(--color-primary, #AA9177);
}

.team-photo-box {
    flex-shrink: 0;
    width: 160px;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--color-primary-light, #F9F8F6);
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.team-profile-card:hover .team-photo {
    transform: scale(1.04);
}

.team-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary, #AA9177), var(--color-primary-dark, #8A725A));
    color: #fff;
    font-size: 3.5rem;
}

.team-profile-info {
    flex: 1;
    padding-top: 4px;
}

.team-nickname {
    font-size: 0.82rem;
    color: var(--color-primary, #AA9177);
    font-weight: 400;
    margin-left: 6px;
}

/* 保留舊版型（未使用時不衝突） */
.team-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.team-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.team-card-lg {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    text-align: left;
    padding: 32px;
}

.team-card-lg .team-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin: 0;
}

.team-card-lg .team-info {
    flex: 1;
}

.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 14px;
}

.team-tags span {
    background: var(--color-primary-light, #F9F8F6);
    color: var(--color-primary, #AA9177);
    border: 1px solid var(--color-primary, #AA9177);
    border-radius: 50px;
    font-size: 0.75rem;
    padding: 2px 10px;
    font-weight: 500;
}

/* --- Stats Banner --- */
.stats-banner {
    background: var(--color-primary-dark, #8A725A);
    color: #fff;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 80px;
    box-shadow: 0 8px 24px rgba(170, 145, 119, 0.3);
}

.stat-item h4 {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary, #AA9177), var(--border-color, #EAE9E8));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    /* 初始隱藏，JS 觸發後顯示 */
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.slide-from-left {
    transform: translateX(-40px);
}

.timeline-item.slide-from-right {
    transform: translateX(40px);
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--color-primary, #AA9177);
    border-radius: 50%;
    border: 4px solid var(--bg-surface, #fff);
    box-shadow: 0 0 0 2px var(--color-primary, #AA9177);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.4);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-year {
    font-weight: 700;
    color: var(--color-primary, #AA9177);
    font-size: 1.05rem;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.timeline-content h5 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary, #3C3A38);
}

.timeline-content p {
    color: var(--text-secondary, #7B7874);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* --- 痛點對比區塊 --- */
.problem-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 80px;
}

.problem-card {
    background: var(--bg-surface, #fff);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color, #EAE9E8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.problem-card.solution {
    border-color: var(--color-primary, #AA9177);
    box-shadow: 0 8px 24px rgba(170, 145, 119, 0.12);
}

.problem-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary, #7B7874);
    margin-bottom: 20px;
}

.problem-card.solution .problem-label {
    color: var(--color-primary, #AA9177);
}

.problem-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
}

.problem-item i {
    margin-top: 2px;
    font-size: 1rem;
    flex-shrink: 0;
}

.problem-card.pain .problem-item i {
    color: #ccc;
}

.problem-card.solution .problem-item i {
    color: var(--color-primary, #AA9177);
}

.problem-item strong {
    display: block;
    color: var(--text-primary, #3C3A38);
    font-weight: 600;
    margin-bottom: 2px;
}

.problem-item span {
    color: var(--text-secondary, #7B7874);
    font-size: 0.82rem;
}

.problem-result {
    text-align: center;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.problem-result.bad {
    background: #f5f5f5;
    color: #999;
}

.problem-result.good {
    background: var(--color-primary-light, #F9F8F6);
    color: var(--color-primary, #AA9177);
    border: 1px solid var(--color-primary, #AA9177);
}

.problem-arrow {
    text-align: center;
    color: var(--color-primary, #AA9177);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.problem-arrow i {
    font-size: 2rem;
}

.problem-arrow span {
    font-size: 0.75rem;
    color: var(--text-secondary, #7B7874);
    line-height: 1.5;
    text-align: center;
}

/* --- 生態系三大模組 --- */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.ecosystem-card .ecosystem-icon {
    background: linear-gradient(135deg, var(--color-primary, #AA9177), var(--color-primary-dark, #8A725A));
    color: #fff;
}

.ecosystem-card:hover .ecosystem-icon {
    background: linear-gradient(135deg, var(--color-primary-dark, #8A725A), #6B5540);
    color: #fff;
}

.mb-ecosystem {
    max-width: 600px;
    margin: -20px auto 50px;
}

.ecosystem-tagline {
    background: var(--color-primary-light, #F9F8F6);
    border: 1px solid var(--border-color, #EAE9E8);
    border-radius: 50px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-secondary, #7B7874);
    margin-bottom: 80px;
}

.tagline-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tagline-group i {
    color: var(--color-primary, #AA9177);
}

.tagline-group strong {
    color: var(--text-primary, #3C3A38);
    margin-right: 4px;
}

.tagline-divider {
    color: var(--border-color, #EAE9E8);
    font-size: 1.2rem;
}

/* --- 四大自建系統 --- */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.system-card {
    background: var(--bg-surface, #fff);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border-color, #EAE9E8);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.system-card:hover {
    box-shadow: 0 10px 28px rgba(170, 145, 119, 0.15);
    border-color: var(--color-primary, #AA9177);
    transform: translateY(-4px);
}

.system-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary-light, #F9F8F6);
    color: var(--color-primary, #AA9177);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    transition: background 0.3s, color 0.3s;
}

.system-card:hover .system-icon {
    background: var(--color-primary, #AA9177);
    color: #fff;
}

.system-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #3C3A38);
    margin-bottom: 10px;
}

.system-card p {
    font-size: 0.85rem;
    color: var(--text-secondary, #7B7874);
    line-height: 1.6;
    margin: 0;
}

/* --- 獲獎實績 --- */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 80px;
}

.award-item {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-color, #EAE9E8);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.award-item:hover {
    box-shadow: 0 6px 20px rgba(170, 145, 119, 0.12);
    border-color: var(--color-primary, #AA9177);
}

.award-item.featured {
    background: linear-gradient(135deg, var(--color-primary, #AA9177), var(--color-primary-dark, #8A725A));
    border-color: transparent;
    color: #fff;
}

.award-year {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Noto Serif TC', serif;
    color: var(--color-primary, #AA9177);
    margin-bottom: 8px;
}

.award-item.featured .award-year {
    color: rgba(255, 255, 255, 0.8);
}

.award-name {
    font-size: 0.82rem;
    color: var(--text-primary, #3C3A38);
    line-height: 1.5;
    font-weight: 500;
}

.award-item.featured .award-name {
    color: #fff;
    font-weight: 600;
}

/* --- CTA 區塊 --- */
.about-cta {
    text-align: center;
    padding: 60px 20px;
}

.about-cta h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--text-primary, #3C3A38);
}

/* --- RWD --- */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid,
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .awards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid-3 {
        grid-template-columns: 1fr;
    }

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

    .problem-arrow {
        flex-direction: row;
        justify-content: center;
        padding: 10px 0;
    }

    .problem-arrow i {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .about-hero {
        height: 280px;
        background-attachment: scroll; /* 手機靜止背景，JS 也會補這個 */
    }

    .brand-card {
        padding: 30px 20px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

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

    .story-section {
        flex-direction: column;
        padding: 25px;
        gap: 25px;
    }

    .story-img-box {
        width: 100%;
        height: 220px;
    }

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

    /* 手機版 team card 不套用漂浮視差（避免錯位） */
    .team-card {
        will-change: auto;
    }

    .stats-banner {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }

    .timeline::before {
        left: 20px;
    }

    /* 手機版覆蓋奇偶排版：提高選擇器特異性，避免使用 !important */
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
        /* 手機版統一從下方淡入 */
        transform: translateY(20px);
    }

    .timeline-item:nth-child(odd).is-visible,
    .timeline-item:nth-child(even).is-visible {
        transform: translateY(0);
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 11px;
        right: auto;
    }

    /* 手機版按鈕點擊區域 ≥ 44px */
    .brand-card .btn {
        min-height: 44px;
        padding: 10px 20px;
    }

    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .awards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid-2,
    .team-grid-3 {
        grid-template-columns: 1fr;
    }

    .team-card-lg {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .team-profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 28px 20px;
        gap: 20px;
    }

    .team-photo-box {
        width: 120px;
        height: 150px;
    }

    .team-tags {
        justify-content: center;
    }

    .ecosystem-tagline {
        flex-direction: column;
        gap: 12px;
        border-radius: 16px;
        text-align: center;
    }

    .tagline-divider {
        display: none;
    }
}

/* --- 空間實景 Gallery --- */
.space-gallery {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
    margin-bottom: 80px;
    border-radius: 20px;
    overflow: hidden;
}

.space-gallery-main {
    position: relative;
}

.space-gallery-side {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
}

.space-side-item {
    position: relative;
}

.space-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.space-gallery-main .space-img {
    height: 440px;
    border-radius: 16px 0 0 16px;
}

.space-side-item .space-img {
    height: 136px;
    border-radius: 0;
}

.space-side-item:first-child .space-img {
    border-radius: 0 16px 0 0;
}

.space-side-item:last-child .space-img {
    border-radius: 0 0 16px 0;
}

.space-gallery-main:hover .space-img,
.space-side-item:hover .space-img {
    transform: scale(1.03);
}

.space-gallery-main,
.space-side-item {
    overflow: hidden;
}

.space-img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 28px 14px 10px;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .space-gallery {
        grid-template-columns: 1fr;
    }

    .space-gallery-main .space-img {
        height: 260px;
        border-radius: 16px 16px 0 0;
    }

    .space-gallery-side {
        grid-template-rows: unset;
        grid-template-columns: repeat(3, 1fr);
    }

    .space-side-item .space-img {
        height: 100px;
    }

    .space-side-item:first-child .space-img {
        border-radius: 0;
    }

    .space-side-item:last-child .space-img {
        border-radius: 0 0 16px 0;
    }

    .space-gallery-side > .space-side-item:first-child .space-img {
        border-radius: 0 0 0 16px;
    }
}
