body {
    height: 100%; /* 전체 화면 높이를 차지하도록 설정 */
    margin: 0;
    padding: 0;
    font-family: 'Nanum Square Neo', sans-serif;
    text-align: center;
    background-color: #f8f8f8;
    color: #000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

a{
    text-decoration: none;
    color: #444;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex-grow: 1; /* 남은 공간을 차지하도록 설정 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 50px 15px;
}

/* 최상단 로고 스타일 */
.logo-header {
    display: block;
    margin: 0 auto;
    width: 200px;
    height: auto;
}

/* 구독하기 텍스트 스타일 (타원형 배경) */
.subscribe-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff; /* 흰색 글씨 */
    background-color: #000; /* 검정색 배경 */
    padding: 12px 18px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    margin: 0 auto 10px;
    margin-bottom: 60px;
}

.subscribe-text {
    font-size: 16px;
    color: #666;
}

.logo {
    width: 100px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin-right: 25px;
    margin-left: 25px;
}

.past-newsletter-title{
    justify-content: center;
    align-items: center;
    width: fit-content;
    font-size: 16px;
    display: block;
    margin: 0 auto;
}

/* 텍스트 정렬 */
.text-content {
    text-align: left;
    flex: 1;
    margin-left: 25px;
    margin-right: 25px;
}

.text-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.text-content p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.card-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 100%;
    justify-content: center;
    padding: 15px;
    margin: 15px auto;
    align-items: center;
    border: 2px solid grey;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    text-decoration: none;
    color: #444;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background-color: white;
    border: 2px solid white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card:hover {
    border: 2px solid #444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #fff;
    background-color: #444;
}

.card-title {
    text-align: left;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}

.card-date {
    text-align: right;
    font-size: 14px;
    color: #777;
    text-decoration: none;
}

/* Footer 스타일 - 화면 최하단 고정 */
.footer {
    background-color: #101010;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    font-size: 12px;
    position: absolute; /* 모바일에서도 하단 고정 */
    bottom: 0;
    left: 0;
    width: 100%;
}

/* Footer 내부 텍스트 */
.footer-text {
    margin: 0;
    font-weight: bold;
    font-size: 16px;
}

.footer-copyright {
    margin: 5px 0 0;
    font-size: 14px;
    color: #fff;
}


@media (max-width: 600px) {
    .card-container {
        grid-template-columns: 1fr; /* 한 줄에 하나씩 */
        padding: 15px; /* 내부 여백 조정 */
    }

    .text-content {
        text-align: center; /* 모바일에서는 가운데 정렬 */
    }

    .subscribe-title {
        font-size: 14px;
        padding: 10px 15px;
    }

    .logo {
        width: 80px;
        height: auto;
    }

    .footer {
        position: relative;
    }

    .container {
        max-width: 100%;
        padding: 30px 10px;
    }

    .logo-header {
        width: 180px; /* 모바일에서는 로고 크기 조정 */
    }
}

/* 모바일에서 가운데 정렬 */
@media (max-width: 380px) {
    .btn-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .logo {
        display: flex;
        justify-content: center;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 15px;
    }

    .text-content {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }

    .footer {
        position: relative;
    }
}