/* dictionary.html 페이지 전용 스타일 */

.mobile-container.dictionary-page {
    padding: 0;
    background-color: var(--color-primary);
    /* 페이지 로드 애니메이션을 위해 초기 상태 설정 */
    opacity: 0;
    display: flex;
    flex-direction: column;
}

/* --- 상단 내비게이션 (재사용) --- */
.top-nav-white {
    background-color: var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 10px;
}

.top-nav-white h2 {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
    margin: 0;
    margin-right: 10%;
    color: white;
    word-break: keep-all;   /* 단어 단위로 줄바꿈 (영문/숫자는 공백 기준) */
    white-space: normal; 
}

.top-nav-white .icon-btn-nav {
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.icon-btn-bordered {
    background: none;

    color: white;
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.icon-btn-bordered i {
    color: white;
}


.main-page {
    flex: 1;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-top: 15px;
    background-color: var(--color-container);
    margin-bottom: 80px;
}

/* --- 검색창 --- */
.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--color-container);
    margin: 0 20px 30px;
    padding: 12px 15px;
    border-radius: 50px;
    box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar i {
    color: var(--color-text-tertiary);
    margin-right: 10px;
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 100%;
}

/* --- 공통 섹션 제목 --- */
section h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 20px 15px;
    word-break: keep-all;   /* 단어 단위로 줄바꿈 (영문/숫자는 공백 기준) */
    white-space: normal; 
}

/* --- 인기 세탁 정보 (캐러셀) --- */
.popular-info .swiper {
    width: 100%;
    height: 200px;
    padding: 0 20px 30px;
    /* 슬라이드 양옆과 페이지네이션 공간 */
}

.popular-info .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    color: white;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.slide-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.slide-content a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.swiper-pagination-bullet-active {
    background-color: var(--color-primary);
}

/* --- 모든 세탁 정보 --- */
.all-info {
    margin-top: 20px;
}

.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px 20px;
    margin-bottom: 10px;
    margin-left: 12px;
}

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

.chip {
    background-color: var(--color-container);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
}

.chip.active {
    background-color: var(--color-primary);
    color: var(--color-container);
    border-color: var(--color-primary);
}

.all-items {
    display: grid;
    gap: 15px;
    padding: 0 20px;
    grid-template-columns: repeat(2, 1fr);
}

#favorites-container {
    display: grid;
    gap: 15px;
    padding: 0 20px;
    grid-template-columns: repeat(2, 1fr);
}

.info-grid .category {
    grid-column: span 2;
    /* 이 한 줄을 추가하세요 */
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px;
    margin-bottom: 0px;
}

.info-grid-item {
    background-color: #ccc;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1.1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Add transition for a smooth effect */
}

.info-grid-item:hover {
    transform: translateY(-10px);
    /* Lifts the item up by 10 pixels */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    /* Adds a shadow */
}

.info-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.item-content h4 {
    font-size: 15px;
    font-weight: 500;
}

.like-btn {
    background: transparent;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.like-btn.active {
    color: #FF4757;
}

.category-title {
    margin-left: 20px;
    margin-bottom: 15px;
    word-break: keep-all;   /* 단어 단위로 줄바꿈 (영문/숫자는 공백 기준) */
    white-space: normal; 
}

.like-btn .fa-heart {
    font-size: 22px;
    /* 원하는 크기로 조절하세요. (예: 24px, 32px 등) */
}

.title-all {
    margin-left: 33px;
    margin-bottom: 15px;
    word-break: keep-all;   /* 단어 단위로 줄바꿈 (영문/숫자는 공백 기준) */
    white-space: normal; 
}

.icon-btn-nav {
    color: black;
}

.all-items .info-grid-item.hidden {
    display: none;
}

.show-more-container {
    text-align: center;
    margin-top: 10px;
    justify-content: center;
    /* 자식 요소(버튼)들을 그룹으로 묶어 중앙 정렬 */
    display: flex;
    /* Flexbox 컨테이너로 지정 */

}

.show-more-btn {
    border: none;
    margin-left: 22px;
    padding: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.5s ease-in-out;
    border-radius: 10px;
}

.show-more-btn:hover {
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    background-color: var(--color-primary);
}

.show-less-btn {
    border: none;
    margin-left: 22px;
    padding: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 10px;
    transition: background-color 0.2s ease-in-out;

}

.show-less-btn:hover {
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    background-color: var(--color-primary);
}