/* =========================================================
   홈(index.html) 전용 스타일
   값은 rainbowgimpo.com 홈을 크롬에서 직접 잰 계산값
   (2026-11-26, 1920·1600·1440·1366·1300·1000·999·768·690·375 너비).
   공통 틀(머리말·바닥글·글꼴·data-anim·.hl·data-bg-anim·.container·.btn)은 base.css/main.js 몫.
   중단점(김포무지개와 같음): 1300 이하 / 999 이하 / 690 이하
   ========================================================= */

.page-home {
  --home-accent: var(--accent, #009fe3);
  --home-ease-card: cubic-bezier(.05, .2, .1, 1);     /* 카드 뜨기·그늘 0.65s */
}

/* ---------- 제목·문단 여백 (크기는 base.css) ---------- */
.page-home main h1 { margin: 0 0 8px; }
.page-home main p  { margin: 0; padding: 0 0 27px; }
.page-home main p:last-child { padding-bottom: 0; }

/* 단추 줄: 위 내용과 40px */
.page-home .home-btn-row { margin-top: 40px; }

/* =========================================================
   1. 큰 사진 위 문구
   ========================================================= */
.page-home .home-hero {
  position: relative;
  overflow: hidden;
  padding: 15% 0;            /* 폭(스크롤 막대 뺀)의 15%, 원본과 같음 */
  background-color: #d1d1ca;
  color: #fff;
}
.page-home .home-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.page-home .home-hero__overlay {
  position: absolute;
  inset: 0;
  background-color: #000;
  opacity: .5;
}
.page-home .home-hero__content {
  position: relative;
  z-index: 2;
  text-align: left;
}
.page-home .home-hero h1 { color: #fff; }
/* 두 문구 묶음은 화면에 따라 하나만 보이지만, 묶음마다 아래 40px 간격은 늘 남는다(원본 구조와 같음).
   여백이 겹쳐 사라지지 않게 padding + flow-root */
.page-home .home-hero__title { display: flow-root; padding-bottom: 40px; }
.page-home .home-hero__title--narrow h1 { display: none; }
.page-home .home-hero__badge img {
  display: block;
  width: 420px; /* hlee 11/26: 더 크게 (원본 300px) */
  max-width: 100%;
  height: auto;
}

/* =========================================================
   2. 65세 이상 누구나 신청 가능합니다
   ========================================================= */
.page-home .home-intro {
  padding: 90px 0;
  margin-bottom: 40px;
  text-align: center;
  color: #000;
}
.page-home .home-intro h2 { margin-bottom: 27px; }
.page-home .home-intro .home-intro__text {
  display: inline-block;
  max-width: 1070px;
  padding-bottom: 0;
  font-weight: 400;
  color: #000;
}

/* =========================================================
   3. 서비스 안내 카드 3장 (회색 띠, 카드 사이 20px)
   ========================================================= */
.page-home .home-services {
  padding: 70px 0;
  background-color: #f4f4f4;
  text-align: center;
}
.page-home .home-cards {
  display: flex;
  margin: 40px -10px 0;
}
.page-home .home-cards__col {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 10px;
  margin-bottom: 20px;
}
.page-home .home-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;
  min-height: 500px;
  padding: 11%;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: #fff;
  transition: transform .65s var(--home-ease-card), box-shadow .65s var(--home-ease-card);
}
.page-home .home-card__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: 50% 50%;
  transform: scale(1);
  transition: transform 1s ease;
}
/* 평소: 아래 85%에 검은 그러데이션 / 올리면: 같은 자리에 파란 그러데이션 */
.page-home .home-card__bg::before,
.page-home .home-card__bg::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 85%;
  z-index: 10;
  transition: opacity .65s var(--home-ease-card);
}
.page-home .home-card__bg::before {
  background: linear-gradient(to bottom, rgba(15, 15, 15, 0), rgba(15, 15, 15, .75) 100%);
  opacity: 1;
}
.page-home .home-card__bg::after {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--home-accent) 100%);
  opacity: 0;
}
.page-home .home-card__inner {
  position: relative;
  z-index: 10;
  width: 100%;
  align-self: flex-end;
}
.page-home .home-card h3 { color: #fff; }

/* 마우스 올림: 카드 10px 위로 + 그늘, 사진은 9초 동안 천천히 1.2배 */
.page-home .home-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, .22);
}
.page-home .home-card:hover .home-card__bg {
  transform: scale(1.2);
  transition: transform 9s cubic-bezier(.1, .2, .7, 1);
}
.page-home .home-card:hover .home-card__bg::before { opacity: 0; }
.page-home .home-card:hover .home-card__bg::after { opacity: 1; }

/* =========================================================
   4. 오시는길
   ========================================================= */
.page-home .home-location {
  padding: 50px 0;
  margin-bottom: 27px;
  text-align: center;
  color: #000;
}
/* 지도는 600×450을 1.14배로 키워 보임(원본과 같음). 자리는 원래 크기만큼 차지 */
.page-home .home-map {
  margin-top: 40px;
  padding-bottom: 11px;
  margin-bottom: 40px;
}
.page-home .home-map iframe {
  display: block;
  width: 600px;
  max-width: 100%;
  height: 450px;
  margin: 0 auto;
  border: 0;
  transform: scale(1.14);
}
.page-home .home-location__info h3 { margin-bottom: 8px; color: #000; }
.page-home .home-location__info p { color: #000; }
.page-home .home-location .home-btn-row { margin-top: 40px; }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 999px) {
  .page-home .home-hero__content { padding-top: 24px; }
  /* 원본은 배지 옆 빈 칸 2개가 세로로 쌓이며 25px씩 아래 여백이 생김 → 50px */
  .page-home .home-hero__badge { margin-bottom: 50px; }
  .page-home .home-cards { display: block; }
}

@media (max-width: 690px) {
  .page-home .home-hero__content { padding-top: 34px; }
  .page-home .home-hero__title--wide h1 { display: none; }
  .page-home .home-hero__title--narrow h1 { display: block; }
}
