/* ============================================
   Main Page CSS
   ============================================ */

/* Hero Section */
.main-hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #2e1b0f;
    position: relative;
    min-height: 500px;
    height: 500px;
    overflow: hidden;
}

.main-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.main-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 모바일 메인(.wrap.mo): 히어로가 상단부터 배경을 쓰도록 */
body.main-page .wrap.mo.info .m_info_wrap .container {
	padding-top: 0;
}

.main-hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: calc(var(--belab-content-max) + 2 * var(--belab-gutter-x));
	margin: 0 auto;
	padding: 0 var(--belab-gutter-x);
	box-sizing: border-box;
}

.main-hero-title {
	font-size: 60px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 30px;
	letter-spacing: -0.02em;
}

.main-hero-title .highlight {
	color: #d6a84b;
}

/* Cloud‧Infra‧AI는 한 줄 유지 (모바일 좁은 폭에서만 줄바꿈 방지) */
.main-hero-title-tags {
	display: inline-block;
	white-space: nowrap;
	letter-spacing: -0.03em;
}

.main-hero-subtitle {
	font-size: 24px;
	font-weight: 400;
	line-height: 1.6;
	color: #2d1a0e;
}

/* ── 모바일 히어로: 이미지 제거 + 비즈니스와 동일 그라데이션 ── */
body.main-page .wrap.mo.info .main-hero-section {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #2e1b0f;
	position: relative;
	height: 500px;
	min-height: 500px;
	padding: 0;
	box-sizing: border-box;
	overflow: hidden;
	background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%) !important;
}

body.main-page .wrap.mo.info .main-hero-bg {
	display: none !important;
}

body.main-page .wrap.mo.info .main-hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: calc(var(--belab-content-max) + 2 * var(--belab-gutter-x-sm));
	margin: 0 auto;
	padding: 0 var(--belab-gutter-x-sm);
	box-sizing: border-box;
}

/* Business Section */
.business-section {
	background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.business-content {
	max-width: 2000px;
	width: 100%;
	padding: 50px;
	text-align: center;
}

/* 비즈니스 · 보도자료: 같은 크기(뷰포트에 따라 크게·작게), 가운데 정렬 */
.business-title,
.media-title {
	font-size: clamp(30px, 4.8vw, 48px);
	font-weight: 700;
	color: #2e1b0f;
	line-height: 1.2;
	text-align: center;
	margin-bottom: clamp(24px, 4vw, 40px);
}

.business-service-title {
	font-size: 64px;
	font-weight: 700;
	color: #2e1b0f;
	margin-bottom: 30px;
}

.business-section .business-item .business-item__text > h5.business-service-title {
	font-size: 36px;
	line-height: 1.25;
	margin-bottom: 16px;
}

.business-description {
	font-size: 20px;
	line-height: 1.8;
	color: #2e1b0f;
	margin-bottom: 40px;
}

.business-link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 500;
	color: #555;
	text-decoration: none;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background-color: #fff;
	position: relative;
	overflow: hidden;
	transition: color 0.3s ease, border-color 0.3s ease;
	z-index: 1;
	text-align: center;
}

.business-link::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background-color: #bc481f;
	transition: left 0.3s ease;
	z-index: -1;
}

.business-link:hover {
	color: #fff;
	text-decoration: none;
	border-color: #bc481f;
}

.business-link:hover::before {
	left: 0;
}

/* 스크롤 등장 애니메이션 */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	filter: blur(2px);
	transition:
		opacity 700ms ease,
		transform 700ms ease,
		filter 700ms ease;
	transition-delay: var(--delay, 0ms);
	will-change: opacity, transform, filter;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
	filter: blur(0);
}

/* ── 비즈니스 리스트: 기본(PC 데스크톱) 2열 그리드 ── */
.business-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
	margin-top: 40px;
}

/* ── [FIX] 메인 페이지 PC: 4개 카드 균등 크기 ── */
body.main-page .business-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 1fr; /* 행 높이 균등 */
	gap: 30px;
	margin-top: 40px;
}

body.main-page .business-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 28px;
	padding: 28px 24px;
	min-width: 0;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	box-shadow: 0 18px 60px rgba(46, 27, 15, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	overflow: hidden;
	cursor: pointer;
	position: relative;
	text-decoration: none;
	color: inherit;
	/* 같은 행끼리 높이 균등 */
	align-self: stretch;
}

body.main-page .business-item__media {
	flex: 0 0 auto;
	width: 260px;
	height: 180px; /* ── [FIX] 고정 높이로 4개 이미지 영역 균등 ── */
	min-width: 0;
	overflow: hidden;
	border-radius: 10px;
}

body.main-page .business-item__media img {
	width: 100%;
	height: 100%; /* ── [FIX] 컨테이너 꽉 채움 ── */
	object-fit: cover;
	display: block;
	border-radius: 10px;
	transition: transform 0.4s ease;
}

body.main-page .business-item__text {
	flex: 1;
	min-width: 0;
	text-align: center;
}

body.main-page .business-item__overlay {
	position: absolute;
	inset: 0;
	background: rgba(207, 207, 207, 0.6);
	opacity: 0;
	transition: opacity 0.3s;
}

body.main-page .business-item:hover .business-item__overlay {
	opacity: 1;
}

body.main-page .business-item:hover img {
	transform: scale(1.05);
}

/* ── 브레이크포인트: 1200px 미만 → 카드 내부를 세로(이미지 위, 글 아래)로 전환 ── */
@media only screen and (max-width: 1280px) {
    body.main-page .business-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;  /* 1fr → auto 로 변경 */
        gap: 24px;
		/* padding: 0 50px; */
    }

    body.main-page .business-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        overflow: visible;  /* hidden → visible 로 변경 */
    }

    body.main-page .business-item__media {
        width: 100%;
        height: auto;
        flex: none;
        border-radius: 0;
        overflow: hidden;   /* 이미지 자체는 카드 모서리 넘침 방지 */
    }

    body.main-page .business-item__media img {
        width: 100%;
        height: auto !important;
        max-height: 260px;
        object-fit: contain !important;
        object-position: center center;
        display: block;
        border-radius: 0;
        transform: none !important;
    }

    body.main-page .business-item__text {
        padding: 20px 20px 24px;
    }

    body.main-page .business-section .business-item .business-item__text > h5.business-service-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    body.main-page .business-item__text .business-description {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 0;
    }
}

/* ── 브레이크포인트: 767px 이하 → 1열, 카드 세로, 이미지 안짤림 ── */
@media only screen and (max-width: 767px) {
	body.main-page .business-list {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		gap: 16px;
		margin-top: 20px;
	}

	body.main-page .business-item {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0;
		border-radius: 16px;
	}

	body.main-page .business-item__media {
		width: 100%;
		height: auto;
		flex: none;
		overflow: hidden;
		border-radius: 0;
		display: flex;
		justify-content: center;
	}

	/* 모바일: 이미지 짤리지 않게 — object-fit contain, 고정 높이 제거 */
	body.main-page .business-item__media img {
		width: 75%;
		height: auto !important;
		max-height: none !important;
		object-fit: contain !important;
		object-position: center top;
		display: block;
		border-radius: 0;
		transform: none !important;
	}

	body.main-page .business-item__text {
		padding: 14px 16px 18px;
	}

	body.main-page .business-section .business-item .business-item__text > h5.business-service-title {
		font-size: 20px;
		margin-bottom: 8px;
		line-height: 1.2;
	}

	body.main-page .business-item__text .business-description {
		font-size: 14px;
		line-height: 1.6;
		margin-bottom: 0;
	}

	/* 모바일 hover 효과 비활성화 */
	body.main-page .business-item:hover .business-item__overlay {
		opacity: 0;
	}

	body.main-page .business-item:hover img {
		transform: none !important;
	}
}

/* ── PC 비즈니스 섹션 세부 오버라이드 ── */
body.main-page .wrap.pc.info .business-section .business-content {
	max-width: 2000px;
	margin: 0 auto;
	padding: 50px;
}

body.main-page .wrap.pc.info .business-section .business-list {
	gap: 30px;
	margin-top: 40px;
}

/* Media Section */
.media-section {
	background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%);
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
}

.media-content {
	max-width: calc(var(--belab-content-max) + 2 * var(--belab-gutter-x));
	margin: 0 auto;
	padding: 100px var(--belab-gutter-x) 100px;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.media-title {
	/* 크기·여백은 위 .business-title, .media-title 공통 규칙 사용 */
	margin-bottom: clamp(28px, 5vw, 48px);
}

.media-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	margin-bottom: 60px;
	padding: 50px;
}

.media-item {
    background: rgba(255, 255, 255, 0.55);  /* 0.08 → 0.55 */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
    box-shadow: 0 18px 60px rgba(46, 27, 15, 0.1);  /* 비즈니스 카드와 동일 */
}

.media-item:hover {
	transform: translateY(-5px);
	border-color: rgba(255, 255, 255, 0.28);
	box-shadow: 0 14px 48px rgba(46, 27, 15, 0.12);
}

.media-item-image {
	width: 100%;
	height: 200px;
	background: rgba(255, 255, 255, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-top: 15px;
}

.media-item-image img {
	width: 90%;
	object-fit: cover;
}

.media-item-image img[alt="BeLAB Logo"] {
	object-fit: contain;
	padding: 20px;
}

.media-item-content {
	padding: 30px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 150px;
}

.media-item-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #2e1b0f;
}

.media-item-date {
	font-size: 14px;
	color: rgba(46, 27, 15, 0.65);
	margin-top: auto;
	padding-top: 15px;
}

.media-link-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 500;
	color: #555;
	text-decoration: none;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background-color: #fff;
	position: relative;
	overflow: hidden;
	transition: color 0.3s ease, border-color 0.3s ease;
	z-index: 1;
	text-align: center;
}

.media-link-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background-color: #bc481f;
	transition: left 0.3s ease;
	z-index: -1;
}

.media-link-btn:hover {
	color: #fff;
	text-decoration: none;
	border-color: #bc481f;
}

.media-link-btn:hover::before {
	left: 0;
}

/* ── 태블릿 반응형 (1280px 미만) ── */
@media only screen and (max-width: 1280px) {
	/* PC 히어로: main_pg 없을 경우 그라디언트 폴백 */
	body.main-page .wrap.pc.info .main-hero-section {
		background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%);
	}
	/* 모바일 히어로: 이미지 제거 후 그라데이션 사용 */
	body.main-page .wrap.mo.info .main-hero-section {
		background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%) !important;
	}

	.media-section {
		background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%);
	}
	.business-section {
		background: linear-gradient(90deg, #fff8f0 0%, #ffecd8 30%, #ffe0b8 65%, #ffd49a 100%);
	}
	.business-content {
		padding: 90px 20px;
	}
	.main-hero-title {
		font-size: 48px;
	}
	.main-hero-subtitle {
		font-size: 20px;
	}
	.media-content {
		padding: 80px 30px 40px;
	}

	/* 메인 PC 비즈니스: 태블릿에서도 큰 타입 유지 */
	body.main-page .wrap.pc.info .business-section .business-content {
		padding: 50px 40px;
	}
	body.main-page .wrap.pc.info .business-section .business-item .business-item__text > h5.business-service-title {
		font-size: 36px;
		margin-bottom: 16px;
	}
	body.main-page .wrap.pc.info .business-section .business-item__text .business-description {
		font-size: 20px;
		line-height: 1.8;
	}
}

/* ── 모바일 반응형 (767px 이하) ── */
@media only screen and (max-width: 767px) {
	.business-section {
		padding: 0;
	}
	.business-content {
		padding: 90px 20px;
	}
	.main-hero-title {
		font-size: 36px;
	}
	.main-hero-subtitle {
		font-size: 18px;
	}
	.media-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		/* padding: 0 50px; */
	}
	.media-content {
		padding: 60px 20px 40px;
	}
}

/* 소형 모바일: 히어로 태그 줄 한 줄이 화면에 들어가도록 약간 축소 */
@media only screen and (max-width: 380px) {
	body.main-page .main-hero-title-tags {
		font-size: 0.9em;
		letter-spacing: -0.05em;
	}
}