/* 홍반장 — 사하구 하수구막힘 해결업체
   경량 순수 CSS (프레임워크 미사용) */

:root{
  --red:#c62828;
  --red-dark:#8e1a1a;
  --navy:#1a2b4c;
  --text:#222222;
  --text-light:#666666;
  --bg:#ffffff;
  --bg-alt:#fff5f5;
  --border:#f0d7d7;
  --radius:10px;
  --max:1280px;
  --text-max:640px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Noto Sans KR","Malgun Gothic",sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  word-break:keep-all;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
ul{list-style:none}
.wrap{max-width:var(--max);margin:0 auto;padding:0 20px}
.section{padding:64px 0;background:var(--bg);scroll-margin-top:84px}
.section-alt{background:var(--bg);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
h1,h2,h3{color:var(--navy);font-weight:800}
h2{font-size:28px;margin-bottom:12px;text-align:center}
.section-desc{text-align:center;color:var(--text-light);max-width:var(--text-max);margin:0 auto 36px}

/* 핵심 키워드 강조 (사하구 하수구막힘 / 싱크대막힘 / 변기막힘) */
.kw{
  position:relative;color:var(--red-dark);font-weight:900;
  background:linear-gradient(transparent 62%, rgba(198,40,40,.16) 62%);
  padding:0 2px;white-space:nowrap;
}
.card h3 .kw, #cases h2 .kw, .hero-text h1 .kw{color:var(--red-dark)}

/* 버튼 */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:14px 28px;border-radius:999px;font-weight:700;font-size:16px;
  border:2px solid transparent;cursor:pointer;transition:transform .15s ease,opacity .15s ease;
}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--red);color:#fff}
.btn-primary:hover{background:var(--red-dark)}
.btn-outline{background:#fff;color:var(--red);border-color:var(--red)}
.btn-outline:hover{background:var(--bg-alt)}
.btn-lg{padding:18px 40px;font-size:19px}

/* 상단 고정 바 */
.topbar{
  position:sticky;top:0;z-index:50;background:#fff;
  border-bottom:1px solid var(--border);
}
.topbar .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;padding-bottom:12px}
.logo{font-size:22px;font-weight:900;color:var(--red)}
.topbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.blog-btn{
  display:inline-flex;align-items:center;justify-content:center;
  border:1.5px solid var(--red);color:var(--red);background:var(--bg);
  padding:8px 14px;border-radius:999px;font-weight:700;font-size:13px;white-space:nowrap;
}
.blog-btn:hover{background:var(--bg-alt)}
.tel-btn{
  display:inline-flex;align-items:center;gap:6px;background:var(--red);color:#fff;
  padding:10px 18px;border-radius:999px;font-weight:700;font-size:14px;white-space:nowrap;
}

/* 히어로 */
.hero{padding:56px 0 40px;background:var(--bg)}
.hero .wrap{display:flex;align-items:center;gap:40px;flex-wrap:wrap}
.hero-text{flex:1 1 380px}
.hero-text h1{font-size:34px;line-height:1.35;margin-bottom:16px;white-space:pre-line}
.hero-text p{font-size:17px;color:var(--text-light);max-width:var(--text-max);margin-bottom:24px}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap}
.hero-media{flex:1 1 260px;display:flex;justify-content:center}
.hero-media img{max-width:320px;width:100%}

/* 신뢰 지표 바 */
.trustbar{background:var(--bg);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.trustbar ul{
  display:flex;flex-wrap:wrap;justify-content:center;gap:12px 32px;
  padding:22px 0;color:var(--navy);font-weight:700;font-size:15px;
}
.trustbar li{display:flex;align-items:center;gap:9px}
.trust-icon{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  width:30px;height:30px;border-radius:50%;background:var(--bg-alt);color:var(--red);
}
.trust-icon svg{width:18px;height:18px}
@media (max-width:640px){
  .trust-icon{width:26px;height:26px}
  .trust-icon svg{width:15px;height:15px}
}

/* 카드 그리드 공통 */
.grid{display:grid;gap:22px}
.grid-5{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
/* 사례 1건짜리 동 페이지에서 카드가 전체 폭으로 늘어나 보이는 것 방지 */
.grid-3 > .case-full-card:only-child{max-width:360px}

.card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius);
  padding:26px 20px;text-align:center;
}
.card h3{font-size:17px;margin-bottom:8px}
.card p{font-size:14px;color:var(--text-light)}
.card-icon{font-size:30px;margin-bottom:12px}

/* 서비스 / 왜 홍반장인가 섹션 카드 확대 */
#services .card, #why .card{padding:36px 26px}
#services .card h3, #why .card h3{font-size:20px;margin-bottom:10px}
#services .card p, #why .card p{font-size:15.5px}

/* 아이콘 배지 (서비스 / 왜 홍반장인가 섹션 공통) */
.icon-badge{
  width:88px;height:88px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 18px;box-shadow:0 10px 22px rgba(0,0,0,.14);
  transition:transform .3s cubic-bezier(.16,.8,.3,1);
}
.icon-badge svg{width:46px;height:46px}
.icon-badge--red{background:linear-gradient(155deg,var(--red),var(--red-dark))}
.icon-badge--navy{background:linear-gradient(155deg,#233a63,var(--navy))}
.card:hover .icon-badge{transform:scale(1.08) rotate(-4deg)}
@media (max-width:640px){
  .icon-badge{width:72px;height:72px}
  .icon-badge svg{width:38px;height:38px}
}

/* 사례 카드 */
.case-card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;
}
.case-card img{width:100%;height:190px;object-fit:cover}
.case-body{padding:20px}
.case-tag{
  display:inline-block;background:var(--bg);color:var(--red);border:1px solid var(--red);
  font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;margin-bottom:10px;
}
.case-body h3{font-size:17px;margin-bottom:8px}
.case-body p{font-size:14px;color:var(--text-light);margin-bottom:14px}
.case-caption{font-size:12px;color:#999;margin-top:8px}
.case-link{font-size:14px;font-weight:700;color:var(--red)}

/* 서비스 지역(동) 카드 */
.area-card{
  display:block;text-decoration:none;color:inherit;cursor:pointer;
}
.area-pin{font-size:30px;margin-bottom:12px;line-height:1}
.area-card h3{font-size:18px;margin-bottom:6px;color:var(--navy)}
.area-card p{font-size:13.5px;color:var(--text-light)}
.area-card:hover .area-pin{transform:scale(1.15)}
.area-pin{transition:transform .3s cubic-bezier(.16,.8,.3,1)}

/* 블로그 배너 */
.blog-banner{background:var(--bg);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.blog-banner .wrap{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;
}
.blog-banner-links{display:flex;gap:12px;flex-wrap:wrap}
.blog-banner-links .btn{border-radius:8px;white-space:normal;text-align:center}

/* 하단 CTA */
.bottom-cta{background:var(--bg);text-align:center;border-top:2px solid var(--red)}
.bottom-cta h2{color:var(--navy)}
.bottom-cta p{color:var(--text-light);max-width:var(--text-max);margin:0 auto 26px}

/* 푸터 */
footer{background:var(--bg);color:var(--text-light);padding:36px 0;font-size:13px;border-top:1px solid var(--border)}
footer .wrap{display:flex;flex-direction:column;gap:6px}
footer strong{color:var(--navy)}

/* 태블릿 */
@media (max-width:860px){
  .wrap{padding:0 16px}
  .section{padding:52px 0}
}

/* 모바일 */
@media (max-width:640px){
  .section{padding:40px 0}
  h2{font-size:22px}
  .hero{padding:36px 0 28px}
  .hero-text h1{font-size:25px}
  .hero-text p{font-size:15px}
  .btn{padding:12px 22px;font-size:15px}
  .btn-lg{padding:15px 28px;font-size:16px}
  .topbar-actions{width:100%;justify-content:flex-start}
  .blog-btn{font-size:11.5px;padding:7px 11px}
  .tel-btn span.tel-label{display:none}
  .section{scroll-margin-top:165px}
}

/* 초소형 화면 */
@media (max-width:380px){
  .blog-btn{font-size:11px;padding:6px 9px}
}

/* ===================== 스크롤 리빌 애니메이션 ===================== */
@media (prefers-reduced-motion: no-preference){
  .reveal{
    opacity:0;
    transform:translateY(22px);
    transition:opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1);
    transition-delay:var(--rd, 0ms);
  }
  .reveal.is-visible{opacity:1;transform:translateY(0)}
}

/* 그리드 내부 요소 순차 등장 지연 */
.grid > .reveal:nth-child(1){--rd:0ms}
.grid > .reveal:nth-child(2){--rd:70ms}
.grid > .reveal:nth-child(3){--rd:140ms}
.grid > .reveal:nth-child(4){--rd:210ms}
.grid > .reveal:nth-child(5){--rd:280ms}
.grid > .reveal:nth-child(6){--rd:350ms}
.grid > .reveal:nth-child(7){--rd:420ms}
.grid > .reveal:nth-child(8){--rd:490ms}

/* 상단바 스크롤 축소 효과 */
.topbar{transition:box-shadow .25s ease, padding .25s ease}
.topbar.is-scrolled .wrap{padding-top:8px;padding-bottom:8px}

/* 카드 호버 인터랙션 (그리드 아이템 공통) */
.card, .case-card, .cat-tile, .eq-card, .area-card{
  transition:transform .3s cubic-bezier(.16,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.card:hover, .case-card:hover, .cat-tile:hover, .eq-card:hover, .area-card:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 32px rgba(26,43,76,.10);
  border-color:var(--red);
}
.case-card img, .cat-tile img, .eq-card img{transition:transform .5s cubic-bezier(.16,.8,.3,1)}
.case-card:hover img, .cat-tile:hover img{transform:scale(1.06)}
.eq-card:hover img{transform:scale(1.08)}

/* 버튼 미세 인터랙션 */
.btn{transition:transform .15s ease,opacity .15s ease,background-color .2s ease,box-shadow .2s ease}
.btn-primary:hover, .tel-btn:hover{box-shadow:0 8px 20px rgba(198,40,40,.28)}

/* ===================== 사례 카테고리 타일 (메인페이지) ===================== */
.grid-cat{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.cat-tile{
  position:relative;display:block;border-radius:var(--radius);overflow:hidden;
  border:1px solid var(--border);background:var(--navy);min-height:220px;
  color:#fff;
}
.cat-tile img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:.55}
.cat-tile .cat-tile-inner{
  position:relative;z-index:1;height:100%;min-height:220px;display:flex;flex-direction:column;
  justify-content:flex-end;padding:22px;
  background:linear-gradient(180deg,rgba(26,43,76,0) 30%,rgba(15,22,38,.82) 100%);
}
.cat-tile .cat-icon{font-size:26px;margin-bottom:8px}
.cat-tile h3{color:#fff;font-size:19px;margin-bottom:4px}
.cat-tile p{color:#f0e6e6;font-size:13px}
.cat-tile .cat-count{
  position:absolute;top:14px;right:14px;z-index:2;background:var(--red);color:#fff;
  font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;
}

/* ===================== 장비소개 섹션 ===================== */
.eq-scroll{
  display:flex;gap:18px;overflow-x:auto;padding:6px 4px 18px;scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
.eq-scroll::-webkit-scrollbar{height:6px}
.eq-scroll::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}
.eq-card{
  flex:0 0 230px;scroll-snap-align:start;background:#fff;border:1px solid var(--border);
  border-radius:var(--radius);padding:16px;text-align:center;display:flex;flex-direction:column;
}
/* 가로 스크롤 카드는 IntersectionObserver 기반 reveal 대신, 스크롤 위치와 무관하게
   최초 1회만 재생되는 CSS 애니메이션 사용 (가로로 밀어야 보이는 카드가 계속 숨어있는 문제 방지) */
@media (prefers-reduced-motion: no-preference){
  .eq-card{animation:eqFadeIn .6s cubic-bezier(.16,.8,.3,1) both}
  .eq-card:nth-child(1){animation-delay:0ms}
  .eq-card:nth-child(2){animation-delay:60ms}
  .eq-card:nth-child(3){animation-delay:120ms}
  .eq-card:nth-child(4){animation-delay:180ms}
  .eq-card:nth-child(5){animation-delay:240ms}
  .eq-card:nth-child(6){animation-delay:300ms}
  .eq-card:nth-child(7){animation-delay:360ms}
  .eq-card:nth-child(8){animation-delay:420ms}
}
@keyframes eqFadeIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.eq-card .eq-img-wrap{
  width:100%;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#fff;
  margin-bottom:12px;border:1px solid var(--border);
}
.eq-card img{width:100%;height:100%;object-fit:contain}
.eq-card h4{font-size:14.5px;color:var(--navy);font-weight:700;line-height:1.4;margin-bottom:6px}
.eq-card p{font-size:12.5px;color:var(--text-light);line-height:1.5}
.eq-note{text-align:center;color:#999;font-size:12.5px;margin-top:-4px}

/* ===================== 사례 카테고리 페이지 (자식 페이지) ===================== */
.breadcrumb{font-size:13px;color:var(--text-light);padding:16px 0 0}
.breadcrumb a{color:var(--text-light)}
.breadcrumb a:hover{color:var(--red)}
.breadcrumb .sep{margin:0 6px;color:#ccc}
.breadcrumb .cur{color:var(--red);font-weight:700}

.cat-hero{padding:28px 0 8px;text-align:center}
.cat-hero h1{font-size:27px;color:var(--navy);margin-bottom:10px}
.cat-hero p{color:var(--text-light);max-width:var(--text-max);margin:0 auto}

.cat-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;padding:22px 0 6px}
.cat-tab{
  display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border-radius:999px;
  border:1.5px solid var(--border);color:var(--text-light);font-weight:700;font-size:14px;
  background:#fff;transition:all .2s ease;
}
.cat-tab:hover{border-color:var(--red);color:var(--red)}
.cat-tab.active{background:var(--red);border-color:var(--red);color:#fff}

/* 사례 카드 — 사진을 잘리지 않게 배경으로 표시 + 위에 지역/증상 텍스트 */
.case-full-card{
  position:relative;display:block;border-radius:var(--radius);overflow:hidden;
  aspect-ratio:4/3;background:var(--navy);color:#fff;
  border:1px solid var(--border);
}
a.case-full-card{cursor:pointer}
.case-full-card:hover{transform:translateY(-6px);box-shadow:0 16px 32px rgba(26,43,76,.18);border-color:var(--red)}
.case-full-card .case-photo{position:absolute;inset:0}
.case-full-card .case-bg{
  position:absolute;inset:-10px;background-size:cover;background-position:center;
  filter:blur(20px) brightness(.55);transform:scale(1.15);
}
.case-full-card .case-photo img{
  position:relative;z-index:1;width:100%;height:100%;object-fit:contain;
  transition:transform .5s cubic-bezier(.16,.8,.3,1);
}
.case-full-card:hover .case-photo img{transform:scale(1.045)}
.case-full-card .case-no-img{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(160deg,var(--navy),#0f1626);color:rgba(255,255,255,.5);font-size:44px;
}
.case-full-card .case-example-badge{
  position:absolute;top:10px;right:10px;z-index:2;
  font-size:10.5px;color:rgba(255,255,255,.85);background:rgba(0,0,0,.45);
  padding:4px 9px;border-radius:999px;font-weight:500;letter-spacing:-.2px;
  backdrop-filter:blur(2px);
}
.case-full-card .case-overlay{
  position:absolute;left:0;right:0;bottom:0;z-index:2;padding:18px 18px 16px;
  background:linear-gradient(180deg,rgba(15,22,38,0) 0%,rgba(12,18,32,.58) 45%,rgba(10,15,26,.92) 100%);
}
.case-full-card .case-tag{
  display:inline-block;background:var(--red);color:#fff;font-size:11.5px;font-weight:800;
  padding:4px 10px;border-radius:999px;margin-bottom:8px;
}
.case-full-card h3{color:#fff;font-size:15.5px;line-height:1.4;margin:0;font-weight:700}
.case-full-card .case-arrow{
  position:absolute;bottom:16px;right:16px;z-index:2;width:30px;height:30px;border-radius:50%;
  background:rgba(255,255,255,.16);color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:15px;transition:background .2s ease;
}
.case-full-card:hover .case-arrow{background:var(--red)}

/* ===================== 사례 상세 페이지 ===================== */
.detail-hero{position:relative;background:var(--navy);overflow:hidden}
.detail-hero .detail-bg{
  position:absolute;inset:-10px;background-size:cover;background-position:center;
  filter:blur(26px) brightness(.5);transform:scale(1.15);
}
.detail-hero .detail-photo-wrap{
  position:relative;z-index:1;display:flex;align-items:center;justify-content:center;
  min-height:320px;max-height:520px;padding:28px 0;
}
.detail-hero .detail-photo-wrap img{max-width:100%;max-height:480px;object-fit:contain;border-radius:8px;box-shadow:0 20px 48px rgba(0,0,0,.35)}
.detail-hero .detail-no-img{
  position:relative;z-index:1;min-height:260px;display:flex;align-items:center;justify-content:center;
  font-size:64px;color:rgba(255,255,255,.35);
}
.detail-hero-text{position:relative;z-index:1;padding:0 0 32px;text-align:center}
.detail-hero-text .case-tag{
  display:inline-block;background:var(--red);color:#fff;font-size:12.5px;font-weight:800;
  padding:5px 14px;border-radius:999px;margin-bottom:12px;
}
.detail-hero-text h1{color:#fff;font-size:24px;max-width:var(--text-max);margin:0 auto}
.detail-example-badge{
  display:inline-block;font-size:11.5px;color:rgba(255,255,255,.65);margin-top:10px;
}

.detail-body{max-width:var(--text-max);margin:0 auto;padding:40px 0 8px}
.detail-body p{font-size:15.5px;color:var(--text);margin-bottom:16px;line-height:1.75}
.detail-body .lead{font-size:16.5px;color:var(--navy);font-weight:600;line-height:1.7;margin-bottom:28px}
.detail-body h2{font-size:19px;color:var(--navy);margin:36px 0 14px;padding-top:4px;border-top:1px solid var(--border);padding-top:24px}
.detail-body h2:first-of-type{border-top:none;padding-top:0;margin-top:8px}
.detail-body .detail-note{font-size:12.5px;color:#999;margin-top:-6px}
.detail-facts{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;
  margin:24px 0 8px;padding:20px;background:var(--bg-alt);border-radius:var(--radius);
  border:1px solid var(--border);
}
.detail-facts div{font-size:13.5px;color:var(--text-light)}
.detail-facts strong{display:block;color:var(--navy);font-size:14.5px;margin-bottom:2px}

.detail-related h2{font-size:20px;margin-bottom:20px}
.detail-related .grid-3{grid-template-columns:repeat(3,1fr)}
@media (max-width:760px){.detail-related .grid-3{grid-template-columns:1fr 1fr}}
@media (max-width:480px){.detail-related .grid-3{grid-template-columns:1fr}}
