/* --- 기본 스타일 초기화 --- */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- 전체 레이아웃 --- */
#site-root {
    width: 100%;
}

#masterPage {
    width: 100%;
    margin: 0 auto;
}

/* --- 헤더 (상단 메뉴) --- */
#SITE_HEADER {
    position: relative;
    width: 100%;
    background-color: #fff;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

.header-container {
    position: relative;
    max-width: 980px;
    height: auto;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logo {
    position: static;
    margin-bottom: 20px;
}
#logo img {
    width: 200px;
    height: auto;
}

#main-menu {
    position: static;
}

#main-menu ul {
    display: flex;
    flex-wrap: wrap; /* 모바일에서 메뉴가 여러 줄로 표시될 수 있도록 */
    justify-content: center;
}

#main-menu ul li a {
    font-family: 'fbneogothic', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 12px;
    color: #000;
    transition: color 0.3s ease;
}

#main-menu ul li a:hover, #main-menu ul li a.active {
    color: #888;
}

/* 드롭다운 메뉴 (지역별 안내) */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.6);
    z-index: 1;
    text-align: center;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- 메인 컨텐츠 영역 --- */
#PAGES_CONTAINER {
    padding: 20px 0;
    min-height: 400px;
}

.content-section {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 푸터 (하단 영역) --- */
#SITE_FOOTER {
    background-color: #ED1566;
    color: #fff;
    padding: 20px 0;
}

.footer-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#footer-contact {
    position: static;
    margin-bottom: 20px;
}

#footer-contact h2 {
    font-family: 'fbchamblue', fantasy;
    font-size: 36px;
    margin: 0;
    color: #FFFFFF;
}

#footer-contact h2 span {
    color: #FDECCE;
}

#footer-contact p {
    font-family: 'bm-hanna', sans-serif;
    color: #FDECCE;
    margin: 0;
    font-size: 16px;
}
#footer-contact p span {
    color: #FFFFFF;
}

#social-bar {
    position: static;
    margin-bottom: 20px;
}

#social-bar ul {
    display: flex;
    justify-content: center;
}

#social-bar li {
    margin: 0 5px;
}

#copyright {
    position: static;
    font-size: 12px;
    line-height: 1.5;
}

/* --- 페이지 공통 스타일 --- */
.page-title {
    text-align: center;
    font-size: 24px;
    font-family: 'tway_sky', sans-serif;
    color: #F87070;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6), -1px -1px 1px rgba(0, 0, 0, 0.6);
    margin-top: 20px;
    margin-bottom: 15px;
}

.page-subtitle {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #333;
    padding: 0 15px;
}

.page-content-image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

/* --- 커뮤니티 페이지 스타일 --- */
.post-list-container {
    width: 100%;
    max-width: 940px;
    margin: 20px auto;
    padding: 0 15px;
}
.post-item {
    display: flex;
    flex-direction: column; /* 모바일에서는 수직으로 쌓이도록 변경 */
    border: 1px solid rgba(241,241,241,0.75);
    margin-bottom: 32px;
    background-color: #fff;
    overflow: hidden;
    height: auto; /* 높이 자동 조절 */
}
.post-image {
    width: 100%;
    height: 200px; /* 이미지 높이 고정 또는 비율 유지 */
}
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.post-title {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.3;
    margin: 0 0 10px 0;
    color: #000;
}
.post-excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 15px;
}
.post-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #555;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.post-meta img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

/* --- 게시글 상세 페이지 스타일 --- */
.post-detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 15px;
}
.post-detail-title {
    font-size: 28px;
    margin-bottom: 15px;
}
.post-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: #555;
}
.post-detail-meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}
.post-detail-body {
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 15px;
    padding: 0 15px;
}
.post-detail-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* --- 깜박이는 텍스트 애니메이션 --- */
@keyframes blink-effect {
  0%, 49% {
    color: black;
  }
  50%, 100% {
    color: red;
  }
}

.blinking-text {
  animation: blink-effect 1s infinite;
}


/* --- 태블릿 & 데스크톱 반응형 스타일 --- */
/* 768px 이상일 때 적용 (태블릿) */
@media screen and (min-width: 768px) {
    #SITE_HEADER {
        height: 132px;
    }
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 132px;
    }
    #logo {
        margin-bottom: 0;
        position: absolute;
        top: 31px;
        left: 9px;
    }
    #logo img {
        width: 250px;
    }
    #main-menu {
        position: absolute;
        top: 79px;
        left: 50%;
        transform: translateX(-50%);
    }
    #PAGES_CONTAINER {
        padding: 40px 0;
    }
    .footer-container {
        height: 150px;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
    #footer-contact {
        position: absolute;
        top: 6px;
        left: 8px;
    }
    #footer-contact h2 {
        font-size: 48px;
    }
    #footer-contact p {
        font-size: 18px;
    }
    #social-bar {
        position: absolute;
        bottom: 40px;
        left: 8px;
    }
    #copyright {
        position: absolute;
        top: 50px;
        left: 578px;
        font-size: 13px;
    }
    .page-title {
        font-size: 30px;
        margin-top: 30px;
        margin-bottom: 20px;
    }
    .page-subtitle {
        font-size: 18px;
    }
    .page-content-image {
        width: 600px;
        margin: 30px auto;
    }
    .post-item {
        flex-direction: row; /* 태블릿부터는 가로로 배치 */
        height: 340px;
    }
    .post-image {
        width: 454px;
        height: 100%;
    }
    .post-content {
        flex-grow: 1;
        padding: 36px;
    }
    .post-title {
        font-size: 28px;
    }
    .post-excerpt {
        font-size: 16px;
        flex-grow: 1;
        overflow: hidden;
    }
    .post-detail-title {
        font-size: 40px;
    }
    .post-detail-body {
        max-width: 740px;
        font-size: 16px;
    }
}
/* 980px 이상일 때 적용 (데스크톱) */
@media screen and (min-width: 980px) {
    #main-menu {
        left: 404px;
        transform: none;
    }
    #site-root {
        min-width: 980px;
    }
}

/* =================================================================
   기본 설정 (Body & Background)
   ================================================================= */
body {
    /* 배경 이미지가 로딩되기 전이나 실패 시 보여줄 기본 배경색 */
    background-color: black;

    /* 배경 위에 반투명 검정 필터를 씌워 글자 가독성 확보 */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('골든.jfif');
    
    /* 배경 이미지가 화면을 가득 채우도록 설정 */
    background-size: cover;
    
    /* 배경 이미지가 반복되지 않도록 설정 */
    background-repeat: no-repeat;
    
    /* 스크롤 시 배경 이미지를 화면에 고정 */
    background-attachment: fixed;
    
    /* 배경 이미지를 중앙에 배치 */
    background-position: center center;

    /* 브라우저 기본 여백 제거 */
    margin: 0;
}

/* =================================================================
   1. 최상단 배너 (4.png)
   ================================================================= */
.top-banner {
    text-align: center;
    padding-top: 2cm;
    padding-bottom: 1cm;
}

.top-banner img {
    width: 50%; /* 4.png 이미지 크기 조절 */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* =================================================================
   2. 메인 배너 헤더 (3.jpg)
   ================================================================= */
.banner-header {
    width: 60%;
    margin: 0 auto;
}

.banner-header img {
    width: 100%;
    height: auto;
    display: block;
}

/* =================================================================
   메인 콘텐츠 영역
   ================================================================= */
.site-main {
    padding: 2rem;
}

/* 3. 제목 이미지 (tt.png, tt2.png) */
.title-image {
    text-align: center;
    margin-top: 1cm;
    margin-bottom: 3cm;
}

.title-image img {
    width: 60%; /* 두 제목 이미지의 크기 조절 */
    height: auto;
}

/* 첫 번째 제목 이미지(tt.png)에만 아래쪽 여백 추가 */
.title-image img:first-child {
    margin-bottom: 0.5cm;
}

/* 4. 프리미엄 이미지 배너 */
.grid-header-image {
    margin-bottom: 3cm;
    text-align: center;
}

.grid-header-image img {
    width: 35%; /* 프리미엄 이미지 크기 조절 */
    height: auto;
    display: inline-block;
    border-radius: 8px;
}

/* 5. 중간 삽입 골드 이미지 배너 */
.full-width-banner {
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.full-width-banner img {
    width: 35%; /* 골드 이미지 크기 조절 */
    height: auto;
    display: inline-block;
    border-radius: 8px;
}

/* =================================================================
   6. 이미지 그리드 시스템
   ================================================================= */
/* 기본 그리드 스타일 (4열) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 하단 그리드만 6열로 변경 */
#bottom-grid {
    grid-template-columns: repeat(6, 1fr);
}

/* 그리드 안의 이미지 아이템 스타일 */
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 잘리더라도 영역을 꽉 채움 */
    display: block;
    border-radius: 8px;
}

/* 그리드 이미지 링크 스타일 (밑줄, 테두리 제거 등) */
.grid-item a {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.grid-item a:focus {
    outline: none;
}

/* =================================================================
   7. 풋터 (페이지 하단 정보)
   ================================================================= */
footer {
    text-align: center;
    padding-top: 4cm;
    padding-bottom: 2cm;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.8;
}

footer a {
    color: #eee;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* =================================================================
   모바일 반응형 스타일 (화면 가로 768px 이하일 때 적용)
   ================================================================= */
@media (max-width: 768px) {

    /* --- 1. 전체적인 여백 및 너비 조정 --- */

    /* 최상단 배너 (4.png) 너비 확장 */
    .top-banner img {
        width: 80%;
    }

    /* 메인 배너 (3.jpg) 너비 확장 */
    .banner-header {
        width: 90%;
    }

    /* 메인 콘텐츠 좌우 여백 줄이기 */
    .site-main {
        padding: 1rem;
    }
    
    /* 제목 이미지(tt.png) 너비 확장 */
    .title-image img {
        width: 90%;
    }
    
    /* 프리미엄 및 골드 이미지 너비 확장 */
    .grid-header-image img,
    .full-width-banner img {
        width: 100%;
    }


    /* --- 2. 그리드 시스템 변경 --- */

    /* 기본 그리드를 4열에서 2열로 변경 */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 하단 그리드를 6열에서 3열로 변경 */
    #bottom-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    /* --- 3. cm 단위의 큰 여백들 축소 --- */

    .title-image,
    .grid-header-image {
        margin-bottom: 1.5cm;
    }

    footer {
        padding-top: 2cm;
        padding-bottom: 1.5cm;
    }

}

/* --- 새로 추가된 배너 영역 스타일 (가로 정렬) --- */
.banner-row {
    display: flex; /* 가로 정렬의 핵심 */
    justify-content: center; /* 가운데 정렬 */
    gap: 10px; /* 이미지 사이 간격 */
    margin-top: 20px;
    flex-wrap: wrap; /* 화면이 좁으면 줄바꿈 허용 */
}

.banner-item {
    flex: 1; /* 공간을 균등하게 차지 */
    min-width: 30%; /* 너무 작아지지 않게 최소 너비 설정 */
    max-width: 300px; /* 너무 커지지 않게 제한 */
}

.banner-item img {
    width: 100%; /* 부모 영역에 맞춰 이미지 꽉 채우기 */
    height: auto; /* 비율 유지 */
    display: block;
    border-radius: 10px; /* 모서리 둥글게 (선택사항) */
}

/* --- 메인 이미지 반응형 강제 적용 --- */
.main-hero-image {
    width: 100%;        /* 부모 영역 너비에 꽉 차게 설정 */
    max-width: 100%;    /* 원래 이미지 크기보다 커지지 않게 제한 */
    height: auto;       /* 너비가 줄어들면 높이도 비율에 맞춰 자동 조절 */
    display: block;     /* 불필요한 여백 제거 */
    object-fit: contain; /* 이미지가 찌그러지지 않게 함 */
}