/* =========================================
   아진비닐 홈페이지 스타일
   색상은 로고 가이드 기준
   ========================================= */
:root {
  --navy: #2A4172;      /* 로고 메인 남색 */
  --navy-dark: #1E2F55;
  --black: #231F20;     /* 로고 블랙 */
  --white: #FFFFFF;
  --gray-bg: #F6F7F9;
  --gray-line: #E4E7EC;
  --gray-text: #5B6270;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ----- 상단 메뉴 ----- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--gray-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--navy); }
.nav-cta {
  padding: 9px 20px; border: 1.5px solid var(--navy); border-radius: 999px;
  color: var(--navy); font-weight: 600;
}
.nav-cta:hover { background: var(--navy); color: var(--white) !important; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--black); margin: 5px 0; }

/* ----- 메인 화면 ----- */
.hero {
  position: relative; overflow: hidden; padding: 130px 0 150px;
  background: var(--white);
}
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-photo::before {   /* 사진 왼쪽을 배경색으로 자연스럽게 이어 줌 */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 28%;
  background: linear-gradient(to right, #FFFFFF, rgba(255,255,255,0));
}
.hero-inner { position: relative; }
.hero-inner > * { max-width: 520px; }
.eyebrow { font-size: 13px; letter-spacing: .18em; font-weight: 600; color: var(--navy); margin-bottom: 24px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.25; font-weight: 700; letter-spacing: -0.03em; }
.hero-sub { margin-top: 28px; font-size: 18px; color: var(--gray-text); }
.hero-buttons { margin-top: 44px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 15px 30px; border-radius: 999px; font-weight: 600; font-size: 16px; transition: .2s; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-ghost { border: 1.5px solid var(--gray-line); }
.btn-ghost:hover { border-color: var(--black); }

/* ----- 공통 섹션 ----- */
.section { padding: 110px 0; }
.section-gray { background: var(--gray-bg); }
.section-label { font-size: 13px; letter-spacing: .18em; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.section-label.light { color: rgba(255,255,255,.7); }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

/* ----- 회사 소개 ----- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-text p { font-size: 18px; color: var(--gray-text); }
.about-text p + p { margin-top: 18px; }
.about-photo { margin-top: 64px; border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.custom-head { margin-top: 48px; text-align: center; }
.custom-eyebrow { font-size: 13px; letter-spacing: .18em; font-weight: 600; color: var(--navy); }
.custom-title { margin-top: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.custom-list {
  list-style: none; margin: 36px auto 0; max-width: 760px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center;
}
.custom-list li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.custom-list svg {
  width: 64px; height: 64px; padding: 16px; margin-bottom: 10px;
  color: var(--navy); border: 1px solid var(--gray-line); border-radius: 50%;
}
.custom-list strong { font-size: 14px; letter-spacing: .08em; color: var(--navy); }
.custom-list span { font-size: 14px; color: var(--gray-text); }

/* ----- 제품 ----- */
.product-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card {
  background: var(--white); border: 1px solid var(--gray-line); border-radius: var(--radius);
  padding: 34px 30px; transition: .2s;
}
.product-card:hover { border-color: var(--navy); transform: translateY(-3px); }
.product-icon { width: 48px; height: 48px; color: var(--navy); margin-bottom: 26px; }
.product-card p { margin-top: 8px; color: var(--gray-text); font-size: 15px; }
.product-card-cta { background: var(--navy); border-color: var(--navy); color: var(--white); display: flex; flex-direction: column; justify-content: center; }
.product-card-cta p { color: rgba(255,255,255,.75); }
.product-card-cta .text-link { color: var(--white); margin-top: 20px; }
.text-link { display: inline-block; font-weight: 600; font-size: 15px; color: var(--navy); }
.text-link:hover { text-decoration: underline; }

/* ----- 제작 사례 ----- */
.portfolio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--gray-line);
  background: var(--white); color: var(--gray-text); transition: .2s;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.gallery { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius);
  background: var(--gray-bg); border: 0; padding: 0; cursor: pointer; font: inherit; text-align: left;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); color: var(--white);
  display: flex; flex-direction: column; opacity: 0; transition: .25s;
}
.gallery-item:hover .gallery-cap, .gallery-item:focus-visible .gallery-cap { opacity: 1; }
.gallery-cap em { font-style: normal; font-size: 12px; opacity: .8; }
.gallery-cap strong { font-size: 16px; font-weight: 600; }
.gallery-item.placeholder {
  cursor: default; border: 1px dashed var(--gray-line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--gray-text); font-size: 15px;
  background: repeating-linear-gradient(135deg, var(--gray-bg) 0 12px, var(--white) 12px 24px);
}
.gallery-item.placeholder span { background: var(--white); padding: 12px 18px; border-radius: 10px; }
.gallery-more { text-align: center; margin-top: 36px; }
.more-btn { background: var(--white); font: inherit; font-weight: 600; cursor: pointer; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,18,25,.96);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1000px, 100%); text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: rgba(255,255,255,.85); margin-top: 14px; font-size: 15px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--white);
  font-size: 44px; line-height: 1; cursor: pointer; padding: 12px; opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ----- 강점 ----- */
.strength-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.strength { border-top: 2px solid var(--navy); padding-top: 28px; }
.strength-number { font-size: 44px; font-weight: 700; color: var(--navy); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px; }
.strength-number span { font-size: 16px; font-weight: 600; margin-left: 6px; }
.strength p:last-child { margin-top: 8px; color: var(--gray-text); font-size: 15px; }

/* ----- 사업장 ----- */
.location-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.location { background: var(--white); border-radius: var(--radius); padding: 30px; border: 1px solid var(--gray-line); }
.location-tag {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--navy);
  background: rgba(42,65,114,.08); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.location p { font-size: 16px; margin-bottom: 12px; }

/* ----- 문의 ----- */
.contact { background: var(--navy); color: var(--white); padding: 100px 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.contact-sub { margin-top: 18px; color: rgba(255,255,255,.75); font-size: 17px; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 28px; border-radius: var(--radius); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15); transition: .2s;
}
.contact-item:hover { background: rgba(255,255,255,.16); }
.contact-label { font-size: 14px; color: rgba(255,255,255,.7); }
.contact-value { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

/* ----- 하단 정보 ----- */
.footer { background: var(--black); color: rgba(255,255,255,.6); padding: 56px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.footer-logo { height: 30px; width: auto; opacity: .9; }
.footer-info { text-align: right; line-height: 1.9; }
.copyright { margin-top: 12px; color: rgba(255,255,255,.4); }

.pc-only { display: inline; }

/* =========================================
   모바일 / 태블릿
   ========================================= */
@media (max-width: 900px) {
  /* 메인 화면: 사진 위, 글자 아래 */
  .hero { padding: 0 0 96px; }
  .hero-photo { position: relative; width: 100%; height: 420px; margin-bottom: 56px; }
  .hero-photo::before { inset: auto 0 0 0; width: 100%; height: 30%;
    background: linear-gradient(to top, #FFFFFF, rgba(255,255,255,0)); }
  .about-photo { margin-top: 44px; }
  .about-photo img { aspect-ratio: 4 / 3; }
  .custom-title { font-size: 18px; }
  .custom-list { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }

  .product-grid, .location-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .strength-grid { grid-template-columns: 1fr; gap: 36px; }
  .about, .contact-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--gray-line); padding: 8px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--gray-line); }
  .nav-cta { border: 0 !important; padding: 14px 0 !important; border-radius: 0; }
  .logo img { height: 28px; }

  .hero-photo { height: 300px; margin-bottom: 40px; }
  .hero { padding-bottom: 72px; }
  .hero-sub { font-size: 16px; }
  .pc-only { display: none; }
  .section { padding: 76px 0; }
  .product-grid, .location-grid { grid-template-columns: 1fr; }
  .gallery { gap: 10px; }
  .gallery-cap { opacity: 1; padding: 28px 12px 10px; }
  .gallery-cap strong { font-size: 13px; }
  .filter { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .filter-btn { white-space: nowrap; }
  .contact { padding: 76px 0; }
  .contact-value { font-size: 18px; }
  .footer-inner { flex-direction: column; }
  .footer-info { text-align: left; }
}
/* 제작사례 최신글 카드 크기 */
.gallery.portfolio-latest {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.portfolio-latest-card {
    width: 100%;
    min-width: 0;
}

button.gallery-item.portfolio-lightbox-item {
    display: block;
    width: 100%;
    height: auto;
}

button.gallery-item.portfolio-lightbox-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-latest-title {
    display: block;
    margin-top: 12px;
    color: #231f20;
    font-size: 16px;
    font-weight: 600;
}

.portfolio-latest-date {
    display: block;
    margin-top: 4px;
    color: #8a8f98;
    font-size: 13px;
}

@media (max-width: 900px) {
    .gallery.portfolio-latest {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gallery.portfolio-latest {
        gap: 10px;
    }
}