/**
 * Front page extra styles (office gallery, map, consultation form).
 *
 * @package AriawellTheme
 */

.iel-office-section { padding: 150px 20px; }
.iel-office-section .container { display: flex; flex-direction: column; position: relative; }
.iel-office-section .iel-office-title { margin-bottom: 25px; font-weight: 500; font-size: 33px; color: #0f0f0f; line-height: 45px; letter-spacing: -0.03em; }
.iel-office-section .gallery-grid { column-count: 3; column-gap: clamp(12px, 2vw, 25px); }
.iel-office-section .gallery-grid .item { overflow: hidden; position: relative; break-inside: avoid; margin-bottom: clamp(12px, 2vw, 25px); border-radius: 10px; }
.iel-office-section .gallery-grid .item:hover img { filter: brightness(0.6); }
.iel-office-section .gallery-grid .item img { cursor: pointer; width: 100%; display: block; }
.iel-office-section .swiper-button { display: none; position: absolute; top: 0; }
.iel-office-section .gallery-grid .item .mo { display: none; }
.iel-office-section .swiper-pagination { display: none; gap: 6px; bottom: -25px; }
.iel-office-section .swiper-pagination .swiper-pagination-bullet { background-color: #DADADA; }
.iel-office-section .swiper-pagination > span.swiper-pagination-bullet-active { width: 10px; background-color: #525252; }

.image-popup-overlay { display: none; position: fixed; z-index: 9999; inset: 0; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; }
.image-popup-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; }
.popup-inner { position: relative; width: 100%; max-width: 1160px; }
.popup-swiper { width: 100%; padding: 0 80px; font-size: 0; }
.popup-swiper .swiper-slide { overflow: hidden; border-radius: 20px; }
.popup-swiper img { width: 100%; height: 100%; object-fit: contain; }
.image-popup-close { position: absolute; top: -43px; right: 76px; color: #fff; font-size: 24px; cursor: pointer; border: 0; background: none; }
.popup-swiper .swiper-button-prev { left: 1px; }
.popup-swiper .swiper-button-next { right: 1px; }
.popup-swiper .swiper-button-prev,
.popup-swiper .swiper-button-next { width: 38px; height: 38px; }
.popup-swiper .swiper-button-prev::after,
.popup-swiper .swiper-button-next::after { display: none; }

.consult-notice { margin: 0 0 12px; font-size: 14px; }
.consult-notice.is-success { color: #047857; }
.consult-notice.is-error { color: #b91c1c; }

@media (max-width: 1024px) {
	.iel-office-section { padding: 80px 20px 130px; }
	.iel-office-section .iel-office-title { margin-bottom: 20px; font-size: 23px; line-height: 30px; }
}

@media (max-width: 768px) {
	.iel-office-section .gallery-grid { column-count: unset; }
	.iel-office-section .gallery-grid .item { margin-bottom: 0; }
	.iel-office-section .gallery-grid .item .pc { display: none; }
	.iel-office-section .gallery-grid .item .mo { display: block; }
	.iel-office-section .swiper-button { display: block; }
	.iel-office-section .swiper-button.prev { right: 45px; }
	.iel-office-section .swiper-button.next { right: 0; }
	.iel-office-section .swiper-pagination { display: flex; }
	.iel-office-section .gallery-grid .item:hover img { filter: brightness(1); }
}

body.ms-main { background: #fff; opacity: 1 !important; }

/* JS 로드 전·실패 시에도 콘텐츠가 보이도록 기본 표시 */
body.ms-main .fade-up {
	opacity: 1;
	transform: none;
}

/* JS가 준비되면 스크롤 페이드인만 적용 */
body.ms-main.has-fade-up .fade-up:not(.active) {
	opacity: 0;
	transform: translateY(20px);
}

body.ms-main.has-fade-up .fade-up.active {
	opacity: 1;
	transform: translateY(0);
}

#wrap { min-height: auto; }

/* rem 기반 레이아웃 유틸은 원본 JS 없이 깨지므로 프론트 페이지에서 무력화 */
body.ms-main .wrap-medium {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.custom-foot__map-wr iframe { height: 660px; width: 100%; border: 0; }
.map-section .section-title { font-weight: 600; font-size: 33px; line-height: 45px; color: #0f0f0f; }
.custom-foot__map .map-info-text br { display: none; }

.custom-foot__counsel-content iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* 미사용 고정 UI (마크업 제거됨) */
.fixed-youtube,
.fixed-nav,
.fixed-menu,
.counsel__popup {
	display: none !important;
}

@media (max-width: 1024px) {
	.map-section { padding: 0 20px 80px; }
	.map-section .section-title { font-size: 23px; line-height: 30px; letter-spacing: -0.04em; }
	.custom-foot__map { margin-top: 20px; }
	.custom-foot__map .map-info-text { line-height: 24px; }
	.custom-foot__map .map-info-text br { display: block; }
	.custom-foot__map-wr { border-radius: 12px; overflow: hidden; }
	.custom-foot__map-wr iframe { height: 340px; }
}
