/* =========================================================
   site.css
   - 공통 레이아웃/카드/태블릿 레일/모바일 탭바/라이트박스
   ========================================================= */

:root{
  --wrap-header: 1440px;          /* 전체 기본 폭 */
  --wrap-main: 1560px;            /* 홈 메인(요청) */
  --radius: 16px;
  --shadow: 0 18px 40px rgba(15,23,42,.10);
  --line: rgba(15,23,42,.10);
  --card: #ffffff;
  --muted: rgba(15,23,42,.62);
  --blue: #2563eb;
}

/* layout */
.layout-inner{
  max-width: var(--wrap-main);
  margin: 0 auto;
  padding: 16px;
}
.layout-chrome{
  max-width: var(--wrap-header);
}
.site-main{
  background: #f6f8ff;            /* 중앙부 배경(구분감) */
  min-height: 60vh;
  margin-bottom: -15px;
}

/* 카드 공통 */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =========================================================
   Tablet Side Rail / Mobile Tabbar
   ========================================================= */

/* 기본 숨김 */
.t-rail{ display:none; }
.m-tabbar{ display:none; }

/* ---------- Tablet (좌측 레일) ---------- */
@media (min-width: 981px) and (max-width: 1200px){
  .t-rail{
    display:flex;
    position: fixed;
    top: 112px;                  /* 헤더 높이에 맞춰 조절 */
    left: 12px;
    width: 92px;
    flex-direction: column;
    gap: 10px;
    z-index: 1800;
  }

  .t-rail-item{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 16px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(15,23,42,.10);
    text-decoration:none;
    color: #0f172a;
    font-weight: 900;
    font-size: 12px;
  }
  .t-rail-item:hover{ border-color: rgba(37,99,235,.55); }
  .t-rail-ico{ font-size: 18px; line-height: 1; }
  .t-rail-txt{ font-size: 11px; letter-spacing: -.2px; }

  /* 본문이 레일과 겹치지 않게 */
  .site-main .layout-inner{ padding-left: 120px; }
}

/* ---------- Mobile (하단 탭바) ---------- */
@media (max-width: 980px){
  .m-tabbar{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 10px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(15,23,42,.12);
    box-shadow: 0 18px 40px rgba(15,23,42,.14);
    z-index: 3000;
    backdrop-filter: blur(10px);
  }

  .m-tab{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 14px;
    text-decoration:none;
    color: #0f172a;
    font-weight: 900;
    border: 1px solid transparent;
    background: transparent;
  }
  .m-tab:hover{
    border-color: rgba(37,99,235,.45);
    background: rgba(37,99,235,.06);
  }
  .m-tab:active{ transform: translateY(1px); }
  .m-ico{ font-size: 18px; line-height: 1; }
  .m-txt{ font-size: 11px; letter-spacing: -.2px; }

  .m-tab--more{ cursor:pointer; }

  /* 탭바에 콘텐츠가 가리지 않게 */
  .site-main{ padding-bottom: 92px; }
}

/* =========================================================
   Lightbox (Full Screen)
   ========================================================= */
.lb{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 4000;
}
.lb.is-open{ display:block; }

.lb-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.78);
}

.lb-content{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}

.lb-img{
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;           /* ✅ 기기 상관없이 화면 가득 */
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}

.lb-close{
  position:absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lb-close:hover{ background: rgba(0,0,0,.55); }

/* =========================================================================== */
/* =====                Breadcrumb (FIX)                                 ===== */
/* =========================================================================== */
.breadcrumb,
.breadcrumb ol{
  margin-left: 120 !important;
  padding: 0 !important;
  list-style: none !important; /* ✅ 번호 제거 */
}

.breadcrumb-list{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb-item{
  margin: 0 !important;
  padding: 0 !important;
}

/* ✅ 구분자는 li를 추가하지 않고 CSS로만 */
.breadcrumb-item + .breadcrumb-item::before{
  content: "›";
  margin: 0 6px 0 2px;
  color: rgba(15,23,42,.35);
  font-weight: 900;
}

.breadcrumb-link{
  text-decoration: none;
  color: rgba(15,23,42,.70);
  font-weight: 800;
  font-size: 13px;
}

.breadcrumb-current{
  color: rgba(15,23,42,.92);
  font-weight: 900;
  font-size: 13px;
}

/* =========================
   Page Top (Breadcrumb) FIX
   ========================= */

/* page-top 자체는 전체폭, 내부는 1440px 중앙 정렬 */
.page-top{
  margin-top: -6px;            /* ✅ (2) 파란선 아래 12px */
}

/* 내부 컨테이너를 1440px 중앙에 고정 */
.page-top .page-top-inner{
  max-width: 1440px;           /* ✅ (1) 1440 중앙 */
  margin: 0 auto;
  padding: 0 18px;             /* 좌우 여백(모바일 안전) */
  margin-bottom: -10px;
}

/* breadcrumb가 왼쪽에서 시작하게(이미 flex면 유지) */
.breadcrumb-list{
  justify-content: flex-start;
}

/* =========================
   First Card (Gallery top card) spacing
   ========================= */

/* breadcrumb 아래 첫 카드가 너무 내려간 경우 위로 올림 */
.page-top + .site-main{
  padding-top: 0;              /* 혹시 site-main에 큰 padding-top 있으면 제거 */
}

/* (3) ‘가족 단체사진’ 상단 첫 카드(소개 카드)가 아래로 너무 떨어져 있으면 */
.gallery-page .card:first-of-type,
.gallery-main .card:first-of-type{
  margin-top: 10px;            /* 기존이 24~40px이면 체감 크게 올라감 */
}

/* 혹시 페이지에서 site-main 자체가 위로 많이 내려가면 */
.gallery-main{
  margin-top: 0;
  padding-top: 0;
}

/* =========================
   Layout container widths
   - Home: 1560px
   - Others: 1440px
========================= */

:root{
  --container: 1440px;
  --container-home: 1560px;
  --gutter: 24px;
}

/* 기본(전체 페이지) */
.layout-inner{
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

/* 홈만 더 넓게 */
.page-home .layout-inner{
  width: min(var(--container-home), calc(100% - (var(--gutter) * 2)));
}

/* 작은 화면에서 여백 조금 축소 */
@media (max-width: 640px){
  :root{ --gutter: 16px; }
}

