/* 기본 태그 CSS */
* {
    font-family: 'Noto Sans KR', sans-serif; /* 공통 폰트 설정 */
}

body {
    height: 100%;
    margin: 0;
    padding-bottom: 50px;
    background-color: white;
}

main {
    background-color: white;
    position: relative;
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 40px;

}

.container {
    padding-right: 0;
    padding-left: 0;
}

/* header CSS */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    background-color: white;
}

.headerLeftBtnWrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.headerLeftBtnWrap i {
    font-size: 1.2rem;
    margin-right: 5px;
    color: #6c757d;
}

.headerLeftBtnWrap a {
    text-decoration: none;
    color: #6c757d;
}

.headerLeftTxtWrap {
    font-size: 1rem;
    color: #6c757d;
    display: inline;
    margin-left: 15px;
}

.headerRightBtnWrap {
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 0;
    margin-right: 10px;
}

.headerRightBtnWrap i {
    font-size: 1.2rem;
    color: #6c757d;
}

/* footer CSS */
.footer {
    margin-top: 10px;
    position: fixed;
    /*position: sticky;*/
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    z-index: 1000;
}

.footer .nav-item {
    flex: 1;
    text-align: center;
}

.footer i {
    font-size: 1.2rem;
    color: #6c757d;
}

.footer .nav-item.active i {
    color: #2dbd83;
}

.footer span {
    font-size: 0.7rem;
    display: block;
    margin-top: 1px;
    color: #6c757d;
}

.footer .nav-item {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* 기능 CSS */
.active {
    color: #2dbd83;
}

.active span {
    color: #2dbd83;
}

.headerCenterTxtWrap {
    position: absolute;
    left: 54%; /* 왼쪽 기준으로 50% 이동 */
    transform: translateX(-50%); /* 가운데 정렬 */
    font-size: 1rem;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
}

/* 메인페이지 관련 CSS */
.baby-info {
    padding: 0 10px;
}

/* 아기 정보 */
.baby-info h2 {
    font-size: 1.3rem;
    color: #6c757d;
    font-weight: 600;
}

.baby-info p {
    font-size: 1rem;
    color: #6c757d;
    margin: 0 !important;
}

/* 메인 이미지 */
.main-image-section {
    height: 40vh; /* 부모 컨테이너 높이를 설정 */
}

.main-image-section img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

/* 배우자 정보 */
.partner-info p {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 10px;
}

/* 도움되는 글 */
.helpful-articles {
    background: transparent;
    padding: 10px;
    margin: 20px 0;
}

.section-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: left;
    font-weight: 600;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.article {
    text-align: left;
}

.article img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.article a {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: none;
}

/* 커뮤니티 최신글 */
.community-section {
    background: #ffffff; /* 깔끔한 흰색 배경 */
    padding: 10px;
    margin: 20px 0;
    border-radius: 12px; /* 좀 더 둥글게 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 그림자를 더 부드럽고 입체감 있게 */
    border: 1px solid rgba(0, 0, 0, 0.05); /* 거의 보이지 않는 테두리로 경계만 부드럽게 */
    transition: box-shadow 0.3s ease, transform 0.2s ease; /* 마우스 오버 시 부드럽게 효과 */
}

.community-list {
    list-style: none;
    padding: 5px;
}

.community-list li {
    margin-bottom: 10px;
}

.community-list a {
    text-decoration: none;
    color: #6c757d;
    font-size: 1rem;
}

.community-list a:hover {
    text-decoration: underline;
}

/* 배우자 추가하기 버튼 */
.add-partner-btn {
    display: inline-flex;
    align-items: center;
    background-color: #2dbd83;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.add-partner-btn i {
    margin-right: 5px;
}

.add-partner-btn:hover {
    background-color: #249d6a;
}

.circle-button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background-color: #2dbd83;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.circle-button:hover {
    background-color: #239e6e;
}

.circle-button-tomato {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background-color: tomato;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

/* 로딩 화면 */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 99999;
    display: none;
}

/* GIF 위치 중앙 정렬 */
#loading-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px; /* GIF 크기 조절 */
    height: auto;
}

.icon-head-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.leave-section a {
    text-decoration: none;
    color: #6c757d;
    font-size: 0.8rem;
}

.adslot_1 {
    width: 320px !important;
    height: 100px !important;
}

@media (min-width: 500px) {
    .adslot_1 {
        width: 468px !important;
        height: 60px !important;
    }
}

@media (min-width: 800px) {
    .adslot_1 {
        width: 728px !important;
        height: 90px !important;
    }
}

.showEl {
    display: inline-block !important;;
}
.hiddenEl {
    display: none !important;;
}

/* 아기 박스 CSS */
.baby-card-modal-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: flex-end; /* 하단에 카드 나오게 */
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.baby-card-container {
    background: #fff;
    width: 100%;
    padding: 20px 10px;
    border-radius: 12px 12px 0 0;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    transition: transform 0.3s ease;
}

.baby-card {
    min-width: 100px;
    height: 100px;
    background: #e9ecef;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.baby-card-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.icon-gender-img {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 25px;
    height: 20px;
    object-fit: contain;
}

.baby-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    word-break: keep-all;
}

.icon-selectYn-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.baby-detail-btn {
    width: 25px;
    height: 25px;
    margin-left: 10px;
    background-color: #2dbd83;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, transform 0.2s;
}