/**
 * @파일명 css/layout.css
 * @제작사 ZZAN Studio
 * @설명 레이아웃 기본 스타일 및 공통 유틸리티 클래스 정의
 */

/* [1] 전역 변수 및 루트 설정 */
:root {
    --primary-red: #E12100;
    --primary-red-rgb: 225, 33, 0;
    --text-black: #1A1A1A;
    --text-gray: #666666;
    --bg-white: #FFFFFF;
    --bg-gray: #F8F9FA;
    --border-color: #EEEEEE;
    --container-width: 1200px;
}

/* [2] CSS 초기화 및 기본 요소 스타일 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    overflow-x: hidden;
}
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    font-size: 16px;
    color: var(--text-black);
    background-color: #08090b; /* 창 크기 조절 시 흰 줄 방지를 위해 푸터와 동일한 배경색 설정 */
    line-height: 1.7;
    word-break: keep-all;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul, ol { list-style: none; }

/* [3] 레이아웃 구조 (헤더, 메인 컨테이너, 푸터) */
#layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px;
    overflow: hidden;
    width: 100%;
}

main#container {
    flex: 1;
    width: 100%;
    min-height: calc(100vh - 80px); /* 헤더 높이를 제외한 최소 높이 확보 */
    background-color: var(--bg-white); /* 게시판 등 컨텐츠 페이지는 기본적으로 흰색 배경 유지 */
    margin-bottom: -1px; /* 섹션간 미세 틈 방지 */
}

.content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* [4] 서브 페이지 상단 비주얼(Hero) 섹션 */
.notice-visual {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 50px;
}

.notice-visual .visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.notice-visual .visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.notice-visual .visual-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.notice-visual .visual-desc {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.9;
}

@media screen and (max-width: 768px) {
    .notice-visual {
        height: 200px;
        margin-bottom: 30px;
    }
    .notice-visual .visual-title {
        font-size: 30px;
    }
    .notice-visual .visual-desc {
        font-size: 15px;
    }
}

/* [5] 메인 페이지 개별 섹션 스타일 */
.main-visual {
    width: 100%;
    background-color: var(--bg-gray);
    padding: 100px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.main-visual h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.main-visual p {
    font-size: 1.25rem;
    color: var(--text-gray);
}

/* [6] 그리드 시스템 및 콘텐츠 카드 스타일 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: var(--primary-red);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--primary-red);
}

@media (max-width: 1024px) {
    #layout-container { padding-top: 60px; }
    .content-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
    .main-visual h2 { font-size: 2rem; }
}

/* [7] 공통 유틸리티 클래스 */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}

/* [8] 스크롤 애니메이션 및 상호작용 효과 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* [9] 외부 라이브러리 최적화 (Swiper 슬라이더) */
.swiper-slide {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
