/* 베란다단열공사 · 사이트 전역 스타일 */
:root {
    --bg: #F7F5F0;
    --charcoal: #253330;
    --charcoal-dark: #28312E;
    --green: #35665C;
    --brass: #BD8B55;
    --text: #28312E;
    --text-soft: #4B5750;
    --border: #E1DCCF;
    --white: #FFFFFF;
    --font-head: 'Noto Serif KR', 'Malgun Gothic', 'Apple SD Gothic Neo', serif;
    --font-body: 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    --radius: 10px;
    --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); color: var(--charcoal); line-height: 1.4; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; background: var(--white); }
th, td { border: 1px solid var(--border); padding: .7em .9em; text-align: left; vertical-align: top; }
th { background: var(--charcoal); color: var(--bg); font-family: var(--font-head); }
tr:nth-child(even) td { background: #FBFAF6; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.btn {
    display: inline-block;
    padding: .85em 1.6em;
    border-radius: 999px;
    font-weight: 700;
    font-family: var(--font-body);
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary, .btn-cta {
    background: var(--brass);
    color: var(--charcoal-dark);
}
.btn-primary:hover, .btn-cta:hover { background: #a97940; text-decoration: none; }
.btn-header-cta { padding: .6em 1.3em; font-size: .95rem; }

/* 헤더 */
.site-header { background: var(--charcoal); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { font-family: var(--font-head); font-weight: 700; color: var(--bg); font-size: 1.2rem; }
.brand:hover { text-decoration: none; opacity: .9; }
.main-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.main-nav a { color: var(--bg); opacity: .85; font-weight: 500; }
.main-nav a[aria-current="page"] { opacity: 1; border-bottom: 2px solid var(--brass); }
.main-nav a:hover { opacity: 1; text-decoration: none; }

/* 히어로 */
.hero { background: linear-gradient(180deg, var(--charcoal) 0%, var(--charcoal-dark) 100%); color: var(--bg); padding: 3.2rem 0; }
.hero h1 { color: var(--bg); }
.hero .lede { font-size: 1.1rem; color: #DDE3DE; max-width: 62ch; }
.hero-actions { margin-top: 1.4rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-tel { background: var(--green); color: var(--bg); }
.hero-tel:hover { background: #2a4f47; }

/* 섹션 공통 */
section { padding: 3rem 0; }
section:nth-of-type(even) { background: var(--white); }
.section-sub { color: var(--text-soft); max-width: 68ch; }

/* 카드 그리드 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1.2rem; }
.card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .card-grid-4, .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
}

.svc-card, .region-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    display: block;
    color: var(--text);
}
.svc-card:hover, .region-card:hover { border-color: var(--brass); text-decoration: none; }
.svc-card h3, .region-card h3 { margin-bottom: .4em; }
.svc-card p, .region-card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* 사진 갤러리 (정사각) */
.gallery-group { margin-bottom: 1.6rem; }
.gallery-group h3 { margin-bottom: .6em; }
.gallery-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.gallery-photos img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; width: 100%; }
@media (max-width: 700px) {
    .gallery-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 캐러셀 */
.carousel { position: relative; }
.carousel-track-wrap { overflow: hidden; }
.carousel-track { display: flex; gap: 1rem; transition: transform .4s ease; }
@media (prefers-reduced-motion: reduce) {
    .carousel-track { transition: none; }
}
.carousel-slide { flex: 0 0 100%; }
@media (min-width: 720px) {
    .carousel-slide { flex: 0 0 calc(50% - .5rem); }
}
.carousel-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    color: var(--text);
    height: 100%;
}
.carousel-card:hover { text-decoration: none; border-color: var(--brass); }
.carousel-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.carousel-card-body { padding: 1rem 1.2rem; }
.carousel-card-body h3 { margin-bottom: .3em; }
.carousel-card-body p { margin: 0; color: var(--text-soft); font-size: .93rem; }
.carousel-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
.carousel-btn {
    background: var(--charcoal);
    color: var(--bg);
    border: none;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}
.carousel-btn:hover { background: var(--green); }
.carousel-dots { display: flex; gap: .5rem; align-items: center; }
.carousel-dots button {
    width: 10px; height: 10px; border-radius: 50%;
    border: none; background: var(--border); padding: 0; cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: var(--brass); }

/* FAQ */
.faq-list { display: grid; gap: 1rem; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex-shrink: 0; font-size: 1.3rem; color: var(--brass); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item h3 { color: var(--green); margin: 0; font-size: 1.05rem; }
.faq-item p { margin: .6em 0 0; }

/* 관련 카드 */
.card-grid-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .card-grid-related { grid-template-columns: 1fr; } }
.related-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: block; }
.related-card:hover { text-decoration: none; border-color: var(--brass); }
.related-card-img img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.related-card-body { padding: .9rem 1.1rem; }
.related-card-body h3 { font-size: 1rem; margin-bottom: .3em; }
.related-card-body p { margin: 0; font-size: .9rem; color: var(--text-soft); }

/* CTA band */
.cta-band { background: var(--green); color: var(--bg); text-align: center; padding: 2.6rem 0; }
.cta-inner p { font-size: 1.1rem; margin-bottom: 1.1rem; color: var(--bg); }

/* 체크리스트 */
.checklist { list-style: none; padding: 0; display: grid; gap: .6rem; }
.checklist li { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; padding-left: 2.4rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 1rem; color: var(--brass); font-weight: 700; }

/* 전문가 콘텐츠 */
.expert-content h3 { margin-top: 1.6em; }
.expert-content figure { margin: 1.4rem 0; }
.expert-content figcaption { font-size: .88rem; color: var(--text-soft); margin-top: .4em; }

/* 푸터 */
.site-footer { background: var(--charcoal-dark); color: #C9D1CB; padding: 2.4rem 0; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-biz p { margin: .15em 0; font-size: .9rem; }
.footer-biz-div { color: var(--brass); font-weight: 700; margin-bottom: .5em !important; }
.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; align-self: flex-start; }
.footer-nav a { color: #C9D1CB; font-size: .9rem; }
.footer-nav a:hover { color: var(--bg); }

/* 상담 페이지 전용 */
.contact-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.contact-hero-actions .btn { font-size: 1.05rem; }

@media (max-width: 480px) {
    .header-inner { height: 58px; }
    .main-nav ul { gap: .9rem; }
    .main-nav a { font-size: .88rem; }
    .btn-header-cta { padding: .5em 1em; font-size: .85rem; }
}
