/* layout.css - 페이지 레이아웃 관련 스타일 */

/* 헤더 스타일 */
header {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateY(0);
    opacity: 1;
}

/* 헤더 숨김 상태 */
header.header-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.header-content {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* 필터 버튼 컨테이너 */
.filter-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    padding-top: 5px; /* 필터 상단 여백 추가 */
    margin-top: 5px; /* 상단 마진 추가 */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-container::-webkit-scrollbar {
    display: none;
}

/* body에 헤더 높이만큼 상단 여백 추가 */
body {
    margin-top: 140px; /* 헤더 높이에 맞게 조정 */
}

/* 인트로 섹션 */
.intro-section {
    text-align: center;
    padding: 15px 7px;
    margin: 10px 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--header-gradient);
}

.intro-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
}

.intro-text {
    font-size: 16px;
    color: var(--gray-dark);
    max-width: 700px;
    margin: 0 auto;
}

/* 콘텐츠 그리드 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0 30px;
}

/* 푸터 */
footer {
    background-color: white;
    padding: 30px 0;
    border-top: 1px solid var(--gray);
    margin-top: 30px;
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--gray-dark);
}

/* 메인 콘텐츠 영역 */
main {
    min-height: calc(100vh - 70px - 81px); /* 100vh - 헤더높이 - 푸터높이 */
    padding: 20px 0;
    padding-top: 20px; /* 헤더 높이 + 여백 */
}

/* 광고 컨테이너 기본 스타일 - 전역으로 적용 */
.ad-card {
    width: 325px;
    height: 350px;
    min-width: 325px;
    min-height: 350px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ad-container {
    width: 100% !important;
    height: 100% !important;
    min-width: 320px !important;
    min-height: 250px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    padding: 10px;
}

.ad-container .adsbygoogle {
    width: 100% !important;
    min-width: 300px !important;
    min-height: 230px !important;
    display: block !important;
    visibility: visible !important;
}

.ad-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    z-index: 10;
}

/* 그리드에 있는 광고 카드 추가 스타일 */
.content-grid .ad-card {
    min-width: 325px;
    max-width: 100%;
}

.content-grid .ad-container {
    min-width: 325px !important;
    width: 100% !important;
}

.content-grid .adsbygoogle {
    width: 100% !important;
    min-width: 260px !important;
}