/**
 * AI 서비스 허브 (/ai/index.php)
 * 병원서류 AI UI — hospital_ai_common + hospital page title 톤과 맞춤
 */

body.ai-hub-page {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--gray-800, #1f2937);
    background:
        radial-gradient(circle at 0% 0%, rgba(248, 223, 202, 0.28), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(244, 226, 212, 0.24), transparent 24%),
        radial-gradient(circle at 100% 100%, rgba(236, 214, 205, 0.22), transparent 28%),
        linear-gradient(180deg, #fcfaf6 0%, #f5efe8 52%, #efe6de 100%);
    background-attachment: fixed;
}

@media (max-width: 768px) {
    body.ai-hub-page {
        background-attachment: scroll;
    }
}

.ai-hub-wrapper.hospital-document-ai-wrapper {
    min-height: 0;
    padding-bottom: 8px;
}

/* 히어로와 회사소개형 본문(about) 이어짐 */
main.ai-services-story.about-story-page {
    margin-top: 0;
}

/* 종합서비스와 동일 story 히어로 — 셸 폭·여백만 정리 */
.ai-hub-shell.unified-search-page--story {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .ai-hub-shell.unified-search-page--story {
        padding-left: calc(10px + env(safe-area-inset-left, 0px));
        padding-right: calc(10px + env(safe-area-inset-right, 0px));
    }
}

/**
 * /ai/index.php 전용: story·modern에서 공유하는 us-hero-poster 박스를 쓰지만,
 * 서비스 안내 페이지이므로 카드(보더·채움·쉐도·블러) 없이 페이지 배경에 녹임.
 */
body.ai-hub-page .ai-hub-shell .service-studio-topbar.us-hero-poster {
    background: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
}

/* 히어로 오른쪽(줄바꿈): 4개 바로가기 — story layer hub pill 톤에 맞춤 */
.unified-search-page--story .ai-hub-services-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    flex: 0 1 100%;
    box-sizing: border-box;
}

a.ai-hub-svc-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-height: 80px;
    padding: 12px 10px;
    text-decoration: none;
    color: #1c1917;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(65, 52, 40, 0.12);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(45, 34, 24, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.ai-hub-svc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(45, 34, 24, 0.1);
    border-color: rgba(141, 67, 27, 0.2);
}

a.ai-hub-svc-btn:focus-visible {
    outline: 2px solid #8d431b;
    outline-offset: 2px;
}

a.ai-hub-svc-btn strong {
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.02em;
}

a.ai-hub-svc-btn span {
    font-size: 0.68rem;
    line-height: 1.4;
    color: #57534e;
    word-break: keep-all;
}

@media (max-width: 900px) {
    .unified-search-page--story .ai-hub-services-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 520px;
    }
}

@media (max-width: 480px) {
    .unified-search-page--story .us-hero-poster .ai-hub-services-bar {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 8px;
    }

    a.ai-hub-svc-btn {
        min-height: 0;
        padding: 12px 12px;
    }
}
