/* ----------------------------------------------------------------------
   공통 히어로 — 첫 화면 사진 슬라이더 + 문구 + 버튼.
   랜딩(/)과 사이트 안내(/intro)가 **같은 것**을 쓴다(형아 2026-08-30).
   예전에는 두 페이지가 각자 히어로를 갖고 있어 이중으로 보였다.

   짝: resources/views/partials/he-hero.blade.php
   고칠 일이 생기면 이 파일과 그 조각 두 개만 보면 된다.
---------------------------------------------------------------------- */

.he-hero {
    position: relative;
    background: linear-gradient(160deg, #0f2e2b 0%, #14403b 52%, #071e1c 100%);
    color: #fff;
    overflow: hidden;
    /* 화면 높이에 따라 늘어난다 — 큰 모니터에서 첫 화면이 허전해 보이지 않게.
       min-height 라 콘텐츠가 이보다 크면 그대로 커지고, 낮은 화면(1366x768 등)에서는
       하한(390px)에 걸려 예전과 같은 높이를 지킨다. 상한을 둬서 아래 학습 카드가
       첫 화면에서 완전히 밀려나지 않게 했다(형아 2026-08-30). */
    min-height: clamp(390px, 58vh, 720px);
    display: flex;
    align-items: center;
}

/* 배경 사진 — 문구와 함께 바뀐다 */
.he-hero-media { position: absolute; inset: 0; }
.he-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
}
.he-hero-bg.is-on { opacity: 1; }

/* 사진 위에 딥 틸을 덮어 글자를 읽히게 한다.
   글자가 있는 왼쪽은 진하게, 오른쪽은 옅게 — 사진이 보이도록. */
.he-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(7,30,28,.84) 0%, rgba(15,46,43,.72) 38%, rgba(15,46,43,.38) 72%, rgba(15,46,43,.26) 100%);
}
/* 글자가 앉는 왼쪽만 한 겹 더 눌러 준다 — 사진이 밝아도 흰 글자가 읽히도록. */
.he-hero-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(4,20,18,.34) 0%, rgba(4,20,18,.14) 34%, transparent 58%);
}

.he-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;              /* 세로 가운데 정렬(부모 flex)에서도 가로는 꽉 차게 */
    max-width: 1180px;
    margin: 0 auto;
    padding: 84px 32px 92px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    align-items: flex-start;
}

.he-slider { position: relative; min-height: 232px; width: 100%; max-width: 780px; }
.he-slide {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: none;
}
.he-slide.is-on { opacity: 1; transform: none; pointer-events: auto; }

.he-eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    color: #5eead4;
}
.he-title { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.18; text-wrap: balance; }
.he-title span { display: block; font-size: 40px; color: rgba(255,255,255,.86); }
.he-title strong { display: block; font-size: 52px; color: #fff; font-weight: 800; }

.he-dots { position: absolute; left: 0; bottom: 0; display: flex; gap: 8px; }
.he-dot {
    width: 26px; height: 4px;
    border: 0; padding: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.28);
    cursor: pointer;
    transition: background .2s, width .2s;
}
.he-dot.is-on { background: #5eead4; width: 40px; }
.he-dot:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }


@media (prefers-reduced-motion: reduce) {
    .he-slide, .he-hero-bg { transition: none; }
}

/* 세로가 낮은 화면(1366x768 노트북 등) — 주소창·탭을 빼면 실제 높이가 650~670px 라
   그대로 두면 첫 화면에 버튼까지 안 들어온다. 여기서는 오히려 줄인다. */
@media (max-height: 820px) and (min-width: 901px) {
    .he-hero-inner { padding: 56px 32px 60px; }
    .he-slider { min-height: 196px; }
    .he-title span { font-size: 34px; }
    .he-title strong { font-size: 44px; }
}

@media (max-width: 900px) {
    /* 모바일은 세로로 길어지므로 최소 높이를 걸지 않는다 —
       주소창 때문에 vh 가 실제보다 커서 첫 화면이 과하게 밀린다. */
    .he-hero { min-height: 0; }
    .he-hero-media::after {
        background: linear-gradient(180deg, rgba(7,30,28,.82) 0%, rgba(15,46,43,.74) 55%, rgba(7,30,28,.84) 100%);
    }
    .he-hero-media::before { background: linear-gradient(180deg, rgba(4,20,18,.22) 0%, transparent 60%); }
    .he-hero-inner { gap: 28px; padding: 52px 20px 56px; }
    .he-slider { min-height: 190px; }
    .he-title span { font-size: 30px; }
    .he-title strong { font-size: 38px; }
}

@media (max-width: 640px) {
    .he-title span { font-size: 25px; }
    .he-title strong { font-size: 31px; }
    .he-slider { min-height: 168px; }

}

/* ----------------------------------------------------------------------
   로그인 모달 — /login 링크를 누르면 열린다.
   짝: resources/views/partials/login-modal.blade.php
   (히어로와 함께 첫 화면에서 쓰는 것이라 이 파일에 같이 둔다)
---------------------------------------------------------------------- */
.lg-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lg-modal[hidden] { display: none; }
.lg-dim { position: absolute; inset: 0; background: rgba(4, 20, 18, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.lg-panel {
    position: relative;
    width: 100%; max-width: 380px;
    background: #fff;
    border-radius: 14px;
    padding: 30px 28px 24px;
    box-shadow: 0 26px 70px rgba(3, 25, 22, .42);
    animation: lgIn .18s ease-out;
}
@keyframes lgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lg-panel { animation: none; } }

.lg-x {
    position: absolute; top: 12px; right: 12px;
    width: 34px; height: 34px;
    border: 0; border-radius: 8px;
    background: transparent; color: #64748b;
    font-size: 15px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.lg-x:hover { background: #f1f5f9; color: #0f172a; }

.lg-title { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
.lg-sub { margin: 0 0 18px; font-size: 13.5px; color: #64748b; }

.lg-form { display: flex; flex-direction: column; gap: 10px; }
.lg-field {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1; border-radius: 8px;
    background: #fff;
    transition: border-color .12s, box-shadow .12s;
}
.lg-field:focus-within { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); }
.lg-field i { color: #64748b; font-size: 16px; width: 17px; text-align: center; }
.lg-field input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; font-family: inherit; color: #0f172a; min-width: 0; }

.lg-submit {
    margin-top: 6px; width: 100%;
    padding: 13px; border: 0; border-radius: 8px;
    background: #0f766e; color: #fff;
    font-size: 16px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background .12s;
}
.lg-submit:hover { background: #0b5d56; }

.lg-forgot { display: block; margin-top: 14px; text-align: center; font-size: 13px; color: #64748b; text-decoration: none; }
.lg-forgot:hover { color: #0f766e; text-decoration: underline; }

/* 로그인 실패 안내 — 아이디/비밀번호 오류, 승인 대기, 정지 계정 등 */
.lg-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
    line-height: 1.5;
}
.lg-error i { font-size: 15px; line-height: 1.4; flex-shrink: 0; }
