/* ============================================================
   HANCOT PLATFORM - MAIN PAGE
   파일명: index.css
   위치: src/main/resources/static/css/index.css

   목적: 메인 화면 전용 디자인. 공통 버튼·입력창·배지는
         hancot-common.css, 공통 배치는 hancot-layout.css,
         반복 UI는 hancot-components.css에서 관리합니다.

   사용 방법: 메인 화면 요소에 hc-home 접두어 클래스 적용.
   주의: 기존 페이지 전체에 영향을 주지 않도록 모든 선택자를
         .hc-home 아래로 제한했습니다.

   목차
   01. 메인 화면 전용 변수 및 기본 영역
   02. 메인 상단 소개 영역
   03. 빠른 서비스 메뉴
   04. 메인 콘텐츠 3열 구성 (PC 20:60:20)
   05. 섹션 제목·더보기
   06. 추천 목록 카드
   07. 학교·기업·서비스 유형 배지
   08. 검색 안내 및 결과 없음
   09. 우측 보조 패널
   10. 작은 화면 대응
   11. 모바일 대응
   12. 접근성
   ============================================================ */

/* 01. 메인 화면 전용 변수
   수정: 콘텐츠 간격은 --hc-home-gap, 최대 너비는 --hc-home-max */
.hc-home {
    --hc-home-gap: 20px;
    --hc-home-max: var(--hc-content-max, 1440px);
    color: var(--hc-text, #1e293b);
    width: 100%;
    min-width: 0;
}
.hc-home *, .hc-home *::before, .hc-home *::after { box-sizing: border-box; }
.hc-home .hc-home-container {
    width: min(100%, var(--hc-home-max));
    margin-inline: auto;
    padding: 20px 16px 40px;
}

/* 02. 메인 상단 소개 영역
   수정: 제목 크기 font-size, 영역 여백 padding */
.hc-home .hc-home-hero {
    padding: clamp(20px, 3vw, 36px);
    background: linear-gradient(120deg, #eff6ff, #ffffff 70%);
    border: 1px solid var(--hc-border, #e2e8f0);
    border-radius: var(--hc-radius, 12px);
    margin-bottom: 20px;
}
.hc-home .hc-home-hero-title {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.35;
    font-weight: 750;
}
.hc-home .hc-home-hero-description {
    margin: 0;
    color: var(--hc-muted, #64748b);
    line-height: 1.65;
}

/* 03. 빠른 서비스 메뉴
   수정: PC 표시 개수는 repeat(4, ...), 간격은 gap */
.hc-home .hc-home-quick-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.hc-home .hc-home-quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    color: var(--hc-primary, #2563eb);
    background: #fff;
    border: 1px solid var(--hc-border, #e2e8f0);
    border-radius: var(--hc-radius, 12px);
}
.hc-home .hc-home-quick-link:hover,
.hc-home .hc-home-quick-link:focus-visible {
    background: var(--hc-primary-soft, #eff6ff);
    border-color: var(--hc-primary, #2563eb);
}

/* 04. PC 본문 3열: 좌20% / 가운데60% / 우20%
   좌우 영역이 없으면 hc-home-main-only 클래스를 추가해 1열 사용.
   수정: 20fr 60fr 20fr 비율 변경 가능 */
.hc-home .hc-home-columns {
    display: grid;
    grid-template-columns: minmax(0, 20fr) minmax(0, 60fr) minmax(0, 20fr);
    gap: var(--hc-home-gap);
    align-items: start;
}
.hc-home .hc-home-columns > * { min-width: 0; }
.hc-home .hc-home-columns.hc-home-main-only { grid-template-columns: minmax(0, 1fr); }
.hc-home .hc-home-panel {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--hc-border, #e2e8f0);
    border-radius: var(--hc-radius, 12px);
}

/* 05. 섹션 제목 및 더보기
   수정: 제목 크기 font-size, 하단 간격 margin-bottom */
.hc-home .hc-home-section { margin-bottom: 24px; min-width: 0; }
.hc-home .hc-home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.hc-home .hc-home-section-title { margin: 0; font-size: 1.125rem; font-weight: 750; }
.hc-home .hc-home-more {
    color: var(--hc-primary, #2563eb);
    text-decoration: none;
    font-size: .875rem;
}
.hc-home .hc-home-more:hover { text-decoration: underline; }

/* 06. 추천 기업·학교·서비스 카드
   이미지 크기 변경: width, height
   한 줄 넘침 방지: min-width: 0 및 overflow-wrap */
.hc-home .hc-home-item-list { display: grid; gap: 10px; }
.hc-home .hc-home-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--hc-border, #e2e8f0);
    border-radius: var(--hc-radius, 12px);
    background: #fff;
}
.hc-home .hc-home-item-image {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}
.hc-home .hc-home-item-body { flex: 1; min-width: 0; }
.hc-home .hc-home-item-title {
    margin: 0 0 5px;
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.hc-home .hc-home-item-description {
    margin: 0;
    color: var(--hc-muted, #64748b);
    font-size: .875rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.hc-home .hc-home-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    color: var(--hc-muted, #64748b);
    font-size: .8125rem;
}

/* 07. 유형 배지: 공통 필·선·자·수·고 입력 배지와 구분
   수정: 유형별 color/background */
.hc-home .hc-home-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.hc-home .hc-home-type-school { color: #1d4ed8; background: #dbeafe; }
.hc-home .hc-home-type-company { color: #0f766e; background: #ccfbf1; }
.hc-home .hc-home-type-service { color: #7e22ce; background: #f3e8ff; }

/* 08. 검색 안내 및 결과 없음
   수정: 내부 여백 padding */
.hc-home .hc-home-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--hc-muted, #64748b);
    background: #fff;
    border: 1px dashed var(--hc-border, #e2e8f0);
    border-radius: var(--hc-radius, 12px);
}
.hc-home .hc-home-empty p { margin: 0; }

/* 09. 좌·우 보조 패널 목록
   수정: 목록 행 간격 gap */
.hc-home .hc-home-side-list { display: grid; gap: 10px; }
.hc-home .hc-home-side-link {
    display: block;
    color: var(--hc-text, #1e293b);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.hc-home .hc-home-side-link:hover { color: var(--hc-primary, #2563eb); }

/* 10. 태블릿(768~1199px): 좌우 보조 패널 축소 대신 본문 우선
   사이드 패널은 본문 아래로 이동 */
@media (max-width: 1199.98px) and (min-width: 768px) {
    .hc-home .hc-home-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-home .hc-home-center { grid-column: 1 / -1; grid-row: 1; }
    .hc-home .hc-home-left { grid-column: 1; grid-row: 2; }
    .hc-home .hc-home-right { grid-column: 2; grid-row: 2; }
}

/* 11. 모바일(767.98px 이하): 모든 영역 1열
   빠른 메뉴 2열, 이미지 60px */
@media (max-width: 767.98px) {
    .hc-home .hc-home-container { padding: 12px 10px 24px; }
    .hc-home .hc-home-quick-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .hc-home .hc-home-quick-link { min-height: 52px; padding: 10px 8px; font-size: .875rem; }
    .hc-home .hc-home-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .hc-home .hc-home-center { grid-row: 1; }
    .hc-home .hc-home-left { grid-row: 2; }
    .hc-home .hc-home-right { grid-row: 3; }
    .hc-home .hc-home-panel { padding: 12px; }
    .hc-home .hc-home-item { padding: 10px; gap: 10px; }
    .hc-home .hc-home-item-image { width: 60px; height: 60px; flex-basis: 60px; }
}

/* 12. 접근성: 키보드 탐색 시 포커스 표시
   운영체제의 애니메이션 감소 설정도 존중 */
.hc-home a:focus-visible,
.hc-home button:focus-visible {
    outline: 3px solid var(--hc-primary, #2563eb);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .hc-home *, .hc-home *::before, .hc-home *::after {
        scroll-behavior: auto;
        transition: none;
        animation: none;
    }
}
/* ================= HANCOT INDEX CSS END ================= */


/* =========================================================
   HANCOT 메인 화면 - 기존 배경 이미지 적용
   기존 이미지: /images/hancot/hancot-main.png
========================================================= */

.hero.hancot-bg {
    position: relative;

    width: 100%;
    min-height: 700px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 70px 20px;

    background-color: #123a72;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.55),
            rgba(0, 0, 0, 0.55)
        ),
        url('/images/hancot/hancot-main.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #ffffff;
    text-align: center;
}

.hero.hancot-bg > .container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.hero.hancot-bg h2 {
    margin: 0 0 20px;

    color: #ffffff;

    font-size: clamp(24px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.5;

    word-break: keep-all;
}

.hero.hancot-bg p {
    margin: 0 auto;

    color: #f8fafc;

    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.9;

    word-break: keep-all;
}

.hero.hancot-bg p.small {
    font-size: 13px;
    color: #e2e8f0;
}

/* 태블릿 */
@media (max-width: 1199px) {
    .hero.hancot-bg {
        min-height: 550px;
        padding: 60px 24px;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .hero.hancot-bg {
        min-height: 430px;
        padding: 45px 16px;

        background-position: center center;
    }

    .hero.hancot-bg h2 {
        font-size: 23px;
    }

    .hero.hancot-bg p {
        font-size: 14px;
        line-height: 1.8;
    }

    .hero.hancot-bg p.small {
        font-size: 12px;
    }
}

/* 작은 모바일 */
@media (max-width: 380px) {
    .hero.hancot-bg {
        min-height: 400px;
        padding: 36px 12px;
    }

    .hero.hancot-bg h2 {
        font-size: 21px;
    }
}





/* =========================================================
   HANCOT MAIN - 저장 방식 섹션
   보안모드 / 일반모드 카드
   PC 2열 / 모바일 1열
========================================================= */

/* 01. 저장 방식 전체 영역 */
.section.soft-section {
    width: 100%;
    padding: 70px 0 85px;
    background: #f5f8fc;
}

.section.soft-section > .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 02. 섹션 제목 */
.section.soft-section .section-title-box {
    text-align: center;
    margin-bottom: 42px;
}

.section.soft-section .section-title-box h2 {
    margin: 0 0 12px;
    color: #172b4d;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.4;
}

.section.soft-section .section-title-box p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
    word-break: keep-all;
}

/* 03. 카드 2개 높이 통일 */
.section.soft-section .row > [class*="col-"] {
    display: flex;
    min-width: 0;
}

/* 04. 카드 공통 */
.section.soft-section .storage-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 350px;
    padding: 34px 30px 28px;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;

    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

@media (hover: hover) {
    .section.soft-section .storage-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.11);
    }
}

/* 05. 보안모드 카드 */
.section.soft-section .storage-card.secure-mode {
    border-top: 5px solid #2563eb;
}

.section.soft-section .secure-mode .card-badge {
    background: #eaf2ff;
    color: #1d4ed8;
}

.section.soft-section .secure-mode .card-icon-box {
    background: #eaf2ff;
    color: #2563eb;
}

.section.soft-section .secure-mode .card-footer-tag i {
    color: #2563eb;
}

/* 06. 일반모드 카드 */
.section.soft-section .storage-card.cloud-mode {
    border-top: 5px solid #0891b2;
}

.section.soft-section .cloud-mode .card-badge {
    background: #e6faff;
    color: #0e7490;
}

.section.soft-section .cloud-mode .card-icon-box {
    background: #e6faff;
    color: #0891b2;
}

.section.soft-section .cloud-mode .card-footer-tag i {
    color: #0891b2;
}

/* 07. 카드 상단 영문 배지 */
.section.soft-section .card-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;

    min-height: 28px;
    padding: 5px 12px;

    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

/* 08. 카드 아이콘 */
.section.soft-section .card-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin: 22px 0 20px;
    border-radius: 17px;
}

.section.soft-section .card-icon-box i {
    font-size: 34px;
    line-height: 1;
}

/* 09. 카드 제목 */
.section.soft-section .storage-card .card-title {
    margin: 0 0 16px;

    color: #1e293b;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.45;
    word-break: keep-all;
}

.section.soft-section .storage-card .sub-txt {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* 10. 카드 설명 */
.section.soft-section .storage-card .card-desc {
    margin: 0 0 25px;

    color: #475569;
    font-size: 15px;
    line-height: 1.85;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.section.soft-section .storage-card .card-desc strong {
    color: #1e293b;
    font-weight: 800;
}

/* 11. 카드 하단 특징 */
.section.soft-section .card-footer-tag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;

    margin-top: auto;
    padding-top: 18px;

    border-top: 1px solid #edf2f7;
}

.section.soft-section .card-footer-tag span {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.section.soft-section .card-footer-tag i {
    font-size: 15px;
}

/* 12. 태블릿 */
@media (min-width: 768px) and (max-width: 1100px) {
    .section.soft-section {
        padding: 55px 0 65px;
    }

    .section.soft-section .storage-card {
        padding: 28px 22px;
        min-height: 370px;
    }

    .section.soft-section .storage-card .card-title {
        font-size: 21px;
    }

    .section.soft-section .storage-card .card-desc {
        font-size: 14px;
    }
}

/* 13. 모바일 */
@media (max-width: 767.98px) {
    .section.soft-section {
        padding: 42px 0 52px;
    }

    .section.soft-section > .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section.soft-section .section-title-box {
        margin-bottom: 28px;
    }

    .section.soft-section .section-title-box h2 {
        font-size: 25px;
    }

    .section.soft-section .section-title-box p {
        font-size: 14px;
    }

    .section.soft-section .storage-card {
        min-height: 0;
        padding: 25px 20px 22px;
        border-radius: 15px;
    }

    .section.soft-section .card-icon-box {
        width: 58px;
        height: 58px;
        margin: 18px 0 16px;
    }

    .section.soft-section .card-icon-box i {
        font-size: 29px;
    }

    .section.soft-section .storage-card .card-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .section.soft-section .storage-card .sub-txt {
        font-size: 13px;
    }

    .section.soft-section .storage-card .card-desc {
        font-size: 14px;
        line-height: 1.75;
        margin-bottom: 20px;
    }

    .section.soft-section .card-footer-tag {
        gap: 8px 12px;
        padding-top: 15px;
    }

    .section.soft-section .card-footer-tag span {
        font-size: 12px;
    }
}

/* 14. 작은 모바일 */
@media (max-width: 380px) {
    .section.soft-section .storage-card {
        padding: 20px 16px;
    }

    .section.soft-section .storage-card .card-title {
        font-size: 18px;
    }

    .section.soft-section .card-footer-tag {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 15. 접근성 */
@media (prefers-reduced-motion: reduce) {
    .section.soft-section .storage-card {
        transition: none;
    }

    .section.soft-section .storage-card:hover {
        transform: none;
    }
}

/* ================= STORAGE SECTION END ================= */



