@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Nanum+Brush+Script&display=swap');

/* [공통 초기화] */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; color: #333; overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* 공통 섹션 스타일 */
.section-wrapper { max-width: 1200px; margin: 100px auto; padding: 0 20px; width: 100%; }
.sec-title { font-size: clamp(28px, 5vw, 36px); font-weight: 900; margin-bottom: 15px; color: #111; letter-spacing: -1px; }
.sec-desc { color: #555; margin-bottom: 50px; font-size: clamp(15px, 3vw, 17px); font-weight: 300; }

/* =========================================================
   [★핵심] 퀵 버튼 (TOP & HOME) - 화면 우측 중앙 배치
   ========================================================= */
/* 1. TOP 버튼 (서브페이지 기준) */
.btn-top {
    position: fixed; top: 50%; margin-top: 28px; right: 20px; width: 50px; height: 50px; 
    background: #2E7D32; color: #fff; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; font-size: 12px; font-weight: 800; 
    cursor: pointer; z-index: 1100; box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    transition: 0.4s; opacity: 0; visibility: hidden; flex-direction: column; line-height: 1.2;
}
.btn-top.show { opacity: 1; visibility: visible; }

/* 메인페이지(is-main)일 때 TOP버튼 혼자 정중앙 보정 */
body.is-main .btn-top { margin-top: -25px; }

/* 2. 세로 캡슐형 HOME 버튼 (서브페이지 전용) */
.btn-home {
    position: fixed; top: 50%; margin-top: -77px; right: 20px; width: 50px; height: 95px; 
    background: linear-gradient(135deg, #2E7D32, #0b2212); color: #fff; 
    border-radius: 30px; display: flex; flex-direction: column; align-items: center; 
    justify-content: center; gap: 6px; z-index: 1100; box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-home:hover {
    transform: translateY(-5px); background: linear-gradient(135deg, #1b5e20, #0a1f10);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4); color: #A5D6A7;
}
.btn-home i { font-size: 18px; }
.btn-home span { font-size: 10px; font-weight: 800; letter-spacing: 1px; }

/* 대표자 서명 (하부페이지용) */
.ceo-signature {
    font-family: 'Nanum Brush Script', cursive; font-size: 28px; color: #2E7D32; 
    margin-left: 10px; vertical-align: middle; display: inline-block; transform: rotate(-5deg);
}

/* =========================================================
   1. 헤더 & 네비게이션 (대형 로고 및 문의하기 버튼 포함)
   ========================================================= */
.header-wrap { 
    background: #fff; position: sticky; top: 0; z-index: 1000; width: 100%; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.08); display: flex; align-items: center; 
    justify-content: space-between; padding: 0 40px; height: 120px; transition: 0.3s;
}
.logo-area { flex: 0 0 auto; display: flex; align-items: center; }
.logo-area a { display: flex; align-items: center; }
.header-logo { max-height: 90px; width: auto; object-fit: contain; }

.nav-wrap { flex: 1; display: flex; justify-content: center; }
.gnb { display: flex; height: 100%; align-items: center; gap: 70px; }
.gnb > li { height: 100%; display: flex; align-items: center; position: relative; }
.gnb > li > a { color: #111; font-size: 18px; font-weight: 700; padding: 35px 0; position: relative; }
.gnb > li > a::after { content: ''; position: absolute; bottom: 20px; left: 0; width: 0; height: 3px; background: #2E7D32; transition: 0.3s; }
.gnb > li:hover > a::after { width: 100%; }
.gnb > li:hover > a { color: #2E7D32; }

.depth2-wrap { 
    position: absolute; top: 105px; left: 50%; transform: translateX(-50%); width: 160px; 
    display: none; background: #fff; padding: 15px 0; border-top: 3px solid #2E7D32; 
    border-radius: 0 0 8px 8px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); z-index: 100;
}
.depth2 { display: flex; flex-direction: column; text-align: center; }
.depth2 li a { color: #555; font-size: 15px; display: block; padding: 10px 15px; font-weight: 500; transition: 0.2s; }
.depth2 li a:hover { color: #2E7D32; background: #f8fcf8; font-weight: 700; }

.header-btns { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; }
.header-btns a { padding: 10px 22px; border-radius: 30px; font-size: 14px; font-weight: 800; transition: 0.3s; }

/* [추가] 온라인 문의 버튼 스타일 */
.btn-head-contact { border: 2px solid #555; color: #555; background: #fff; }
.btn-head-contact:hover { background: #555; color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transform: translateY(-2px); }

.btn-head-vol { border: 2px solid #2E7D32; color: #2E7D32; background: transparent; }
.btn-head-vol:hover { background: #2E7D32; color: #fff; box-shadow: 0 5px 15px rgba(46,125,50,0.3); transform: translateY(-2px); }
.btn-head-sup { border: 2px solid #2E7D32; background: #2E7D32; color: #fff; }
.btn-head-sup:hover { background: #1b5e20; border-color: #1b5e20; box-shadow: 0 5px 15px rgba(46,125,50,0.3); transform: translateY(-2px); }

/* =========================================================
   2. 메인 슬라이더 & 캠페인, 공지사항 (기존 동일)
   ========================================================= */
.slider-wrap { 
    width: 100%; height: 65vh; min-height: 500px; max-height: 700px; overflow: hidden; position: relative; 
    background: linear-gradient(rgba(11, 35, 18, 0.75), rgba(11, 35, 18, 0.9)), url('images/mainbanner_01.png') center/cover no-repeat;
    background-color: #0b2212; 
}
.slider-container { display: flex; height: 100%; }
.slide { flex-shrink: 0; width: 100%; display: flex; justify-content: center; }
.slide-inner { max-width: 1200px; width: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 60px; }

.slide-text { flex: 0 0 35%; color: #fff; }
.slide-text h2 { font-size: clamp(32px, 3.5vw, 48px); font-weight: 900; line-height: 1.3; margin-bottom: 20px; letter-spacing: -1px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.slide-text p { font-size: 17px; opacity: 0.85; margin-bottom: 35px; line-height: 1.6; font-weight: 300; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.slide-btn { display: inline-block; padding: 14px 35px; background: #A5D6A7; color: #0b2312; font-size: 15px; font-weight: 900; border-radius: 30px; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.slide-btn:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.slide-img-box { flex: 0 0 60%; aspect-ratio: 16 / 9; border-radius: 15px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.slide-img { width: 100%; height: 100%; background-size: cover; background-position: center; }

.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; z-index: 10; font-size: 20px; transition: 0.3s; }
.slider-btn:hover { background: rgba(255,255,255,0.3); }
.btn-prev { left: 30px; } .btn-next { right: 30px; }

.slider-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; transition: 0.3s; }
.dot.active { background: #A5D6A7; width: 35px; border-radius: 10px; }

/* 캠페인 카드 */
.campaign-section { max-width: 1200px; margin: 100px auto; padding: 0 20px; text-align: center; }
.campaign-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 40px; }
.campaign-card { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.card-bg { width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.campaign-card:hover .card-bg { transform: scale(1.1); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85)); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 70px; }
.card-overlay h4 { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.3; }
.color-bar { position: absolute; bottom: 0; width: 100%; height: 50px; display: flex; justify-content: center; align-items: center; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.bar-carbon { background: #434343; } .bar-water { background: #0077b6; } .bar-recycle { background: #52b788; } .bar-eco { background: #386641; } .bar-edu { background: #f8961e; }

/* 갤러리/공지/정부기관 */
.board-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #111; padding-bottom: 15px; margin-bottom: 30px; }
.board-header h3 { font-size: 28px; font-weight: 900; }
.view-all { font-size: 15px; font-weight: 700; color: #2E7D32; transition: 0.3s; cursor: pointer; }
.view-all:hover { opacity: 0.7; }
.grid-layout { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.grid-item { border-radius: 12px; overflow: hidden; transition: 0.4s; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); cursor: pointer; }
.grid-item:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.grid-img { width: 100%; aspect-ratio: 16 / 10; background-color: #f1f1f1; background-size: cover; background-position: center; transition: 0.5s; }
.grid-item:hover .grid-img { transform: scale(1.05); }
.grid-txt { padding: 20px; font-weight: 700; font-size: 16px; line-height: 1.4; color: #111; }

.main-notice-list li { border-bottom: 1px solid #eaeaea; transition: 0.3s; }
.main-notice-list li:hover { background: #fcfcfc; }
.main-notice-list a { display: flex; justify-content: space-between; align-items: center; padding: 20px 10px; }
.main-notice-list a:hover .title { color: #2E7D32; font-weight: 800; }
.main-notice-list .title { font-size: 16px; color: #333; }
.main-notice-list .badge { background: #e53935; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px; margin-right: 10px; font-weight: 700; }
.main-notice-list .date { color: #888; font-size: 14px; }

.gov-section { background: #f9f9f9; padding: 60px 0; border-top: 1px solid #eee; }
.gov-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; padding: 0 20px; }
.gov-link { background: #fff; border: 1px solid #ddd; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; border-left: 6px solid #ccc; border-radius: 8px; color: #444; transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
.btn-me { border-left-color: #003366; } .btn-keco { border-left-color: #2E7D32; } .btn-gov { border-left-color: #e61919; }
.gov-link:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); border-color: #bbb; color: #111; }
.gov-link small { font-size: 11px; color: #888; margin-bottom: 3px; }

/* =========================================================
   [6] 하단 튜터(푸터) - 사업자번호 없음 / 커스텀 SNS 적용
   ========================================================= */
.main-footer { background: linear-gradient(to bottom, #11361d, #0b2212); color: #fff; padding: 80px 20px 40px; }
.footer-inner-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 2fr 1fr; gap: 50px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 50px; margin-bottom: 40px; }
.footer-info .footer-logo { height: 60px; width: auto; max-width: 250px; margin-bottom: 25px; filter: brightness(0) invert(1); object-fit: contain; }
.footer-info p { font-size: 14px; color: #aaa; line-height: 1.8; margin-bottom: 10px; }
.footer-info strong { color: #ddd; }

.footer-links h4 { font-size: 18px; font-weight: 800; margin-bottom: 25px; color: #fff; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; }
.quick-links a { color: #aaa; font-size: 15px; transition: 0.3s; display: block; }
.quick-links a:hover { color: #A5D6A7; font-weight: 700; transform: translateX(5px); }

.footer-social h4 { font-size: 18px; font-weight: 800; margin-bottom: 25px; color: #fff; }
.sns-links { display: flex; gap: 15px; margin-bottom: 30px; }
.sns-links a { 
    width: 45px; height: 45px; border-radius: 50%; overflow: hidden; 
    display: flex; align-items: center; justify-content: center; 
    background: rgba(255,255,255,0.1); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.sns-links a img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.sns-links a:hover { transform: translateY(-5px) scale(1.1); background: rgba(255,255,255,0.3); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

.footer-policy-wrap { display: flex; flex-direction: column; gap: 10px; }
.btn-policy { background: transparent; color: #aaa; border: 1px solid rgba(255, 255, 255, 0.3); padding: 12px 20px; font-size: 13px; font-weight: 700; border-radius: 5px; cursor: pointer; transition: 0.3s; text-align: center; }
.btn-policy:hover { background: #fff; color: #111; }
.footer-bottom-copy { max-width: 1200px; margin: 0 auto; text-align: center; font-size: 13px; color: #777; }

/* =========================================================
   [7] 팝업 모달 스타일 (정책 & 문의하기 폼)
   ========================================================= */
.modal-overlay, .policy-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: none; align-items: center; justify-content: center; z-index: 2500; backdrop-filter: blur(5px); }
.policy-modal-content { background: #fff; width: 90%; max-width: 800px; height: 80vh; border-radius: 15px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.policy-modal-header { background: #2E7D32; color: #fff; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; }
.policy-modal-header h3 { margin: 0; font-size: 22px; font-weight: 800; }
.policy-close { font-size: 32px; cursor: pointer; line-height: 1; }
.policy-modal-body { padding: 30px 40px; overflow-y: auto; flex: 1; font-size: 15px; color: #444; line-height: 1.8; }
.policy-modal-body h4 { color: #111; margin: 35px 0 15px; font-size: 18px; font-weight: 800; border-left: 4px solid #2E7D32; padding-left: 12px; }
.policy-modal-body p { margin-bottom: 15px; }

/* 문의 폼 모달 전용 */
.modal-content { background: #fff; width: 90%; max-width: 450px; border-radius: 15px; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); animation: slideUp 0.3s ease; }
.modal-header { background: #2E7D32; color: #fff; padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 20px; font-weight: 800; }
.close-modal { font-size: 28px; cursor: pointer; line-height: 1; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 700; color: #444; font-size: 14px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; box-sizing: border-box; }

/* =========================================================
   [8] 모바일 반응형 완벽 연동 (이탈 방지 적용)
   ========================================================= */
@media screen and (max-width: 1024px) {
    .gnb { gap: 30px; }
    .header-btns a { padding: 8px 15px; font-size: 13px; }
    .slide-inner { gap: 30px; }
    .campaign-grid { grid-template-columns: repeat(3, 1fr); }
    .grid-layout { grid-template-columns: repeat(2, 1fr); }
    .footer-inner-grid { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 768px) {
    /* 모바일에서는 홈버튼 숨기고, TOP버튼은 다시 우측 하단 구석으로 원상복구 */
    .btn-home { display: none; } 
    .btn-top { top: auto; bottom: 30px; margin-top: 0; }
    
    .header-wrap { padding: 0 20px; height: 85px; }
    .header-logo { max-height: 50px; }
    .header-btns { display: none; }

    .slider-wrap { padding: 40px 0; height: auto; }
    .slide-inner { flex-direction: column-reverse; gap: 30px; text-align: center; }
    .slide-text { flex: auto; width: 100%; padding-left: 0; }
    .slide-text p { margin-bottom: 20px; }
    .slide-img-box { flex: auto; width: 100%; aspect-ratio: 16/10; }

    .m-menu-btn { display: flex; flex-direction: column; justify-content: space-between; width: 28px; height: 20px; cursor: pointer; z-index: 1001; }
    .m-menu-btn span { width: 100%; height: 3px; background: #2E7D32; transition: 0.3s; }
    .m-menu-btn.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .m-menu-btn.active span:nth-child(2) { opacity: 0; }
    .m-menu-btn.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

    .gnb { display: none; }

    .nav-wrap { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: #fff; transition: 0.4s; padding-top: 95px; box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); overflow-y: auto; }
    .nav-wrap.active { right: 0; }
    .nav-wrap .gnb { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; height: auto; gap: 10px; }
    .nav-wrap .gnb>li { width: 100%; flex-direction: column; align-items: flex-start; }
    .nav-wrap .gnb>li>a { width: 100%; border-bottom: 1px solid #eee; padding: 15px 0; }

    /* [★모바일 하부 메뉴 화면 이탈 완벽 방지] */
    .depth2-wrap { position: static; display: none; transform: none; left: auto; width: 100%; box-shadow: none; padding: 0; background: #f4f9f4; border: none; }
    .depth2 li a { text-align: left; padding: 12px 20px; font-size: 14px; color: #444; border-bottom: 1px dashed #ddd; }

    .campaign-grid, .gov-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner-grid { grid-template-columns: 1fr; gap: 40px; }
}