/* Hero Section */
.hero-section {
    background-color: #FFF9E6;
    padding: 60px 0;
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
}

/* Category Boxes */
.category-box {
    background-color: #FFF2CC;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-box h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.category-box p {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 100%;
    height: 58px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    border-radius: 50px;
    border: 2px solid #fbd01e;
    font-size: 1rem;
    padding: 15px 50px 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-box .search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
}

.search-box .search-btn img {
    width: 24px;
    height: 24px;
}

/* Prompt Messages */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 500px;
}

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

.messages-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.message {
    width: fit-content;
    max-width: 65%;
    word-break: break-word;
    margin-bottom: 20px;
    position: relative;
    background-color: #FFF2CC;
    border-radius: 15px;
    padding: 20px;
    font-size: 1rem;
    color: #000000;
    animation: slideUp 0.6s ease-out;
}

.user-message {
    background-color: #FFF2CC;
    color: black;
    margin-left: auto;
    border-top-right-radius: 0;
}

.bot-message {
    background-color: #ffebae;
    color: #000000;
    margin-right: auto;
    border-top-left-radius: 0;
}

/* 마크다운 콘텐츠 기본 스타일 조정 */
.bot-message .markdown-content {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    max-width: 100%;
    word-break: break-word;
}

/* 제목 크기 조정 */
.bot-message .markdown-content h2 {
    font-size: 18px;
    margin: 16px 0 8px;
}

.bot-message .markdown-content h3 {
    font-size: 16px;
    margin: 12px 0 6px;
}

/* 단락 스타일 */
.bot-message .markdown-content p {
    margin: 6px 0;
}

/* 이미지 크기 조정 */
.bot-message .markdown-content img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 수평선 스타일 */
.bot-message .markdown-content hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 16px 0;
}

.bot-message .markdown-content a {
    color: #6d8bdf;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.bot-message .markdown-content a:hover {
    color: white;
    background-color: #a0b3e8;
}

.bot-typing {
    display: flex;
    margin-bottom: 20px;
    opacity: 0.7;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing-animation 1.5s infinite;
}


.typing-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.typing-dot:nth-child(3) {
    animation-delay: 1s;
}

@keyframes typing-animation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trainers Section */
.trainers-section {
    padding: 60px 0;
    background-color: var(--white-color);
}

.trainers-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
}

.trainer-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.trainer-card:hover {
    transform: translateY(-5px);
}

.trainer-img-container {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    flex-grow: 1;
}

.trainer-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
}

.trainer-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.trainer-specialty {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.trainer-specialty span {
    background-color: #FFE082;
    color: var(--dark-color);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
}

.trainer-location {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.trainer-features {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.trainer-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.trainer-features li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Card Carousel Section */
.card-carousel-section {
    background-color: var(--light-color);
    padding: 60px 0;
}

.card-carousel-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    padding: 0 50px;
}

.carousel-inner {
    overflow: hidden;
}

.review-cards-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
}

.review-card {
    flex: 0 0 calc(33.333% - 14px); /* 3등분에 갭 고려 */
    min-width: calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
    margin: 0;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.review-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    min-height: calc(1.4em * 2);
    max-height: calc(1.4em * 2);
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.review-img-container {
    height: 250px;
    width: 100%;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.review-img-container .review-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-content {
    display: flex;
    flex-direction: column;
    flex: 1; /* 남은 공간 차지 */
    width: 100%;
}

.review-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.review-card p {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: -40px;
}

.carousel-control-next {
    right: -40px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}


/* Certificate Section */
.certificate-section {
    padding: 60px 0;
    background-color: var(--white-color);
}

.certificate-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
}

.certificate-row {
    margin-top: 20px;
    margin-bottom: 20px;
}

.certificate-img-container {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.certificate-img {
    width: 100%;
    height: 100%;
    max-height: 300px;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

.certificate-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.certificate-desc {
    font-size: 1rem;
    color: var(--gray-color);
    line-height: 1.7;
}

/* 반응형 설정 */
@media (min-width: 992px) {
    .carousel-container {
        padding: 0 60px;
    }

    .trainers-section .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .review-card {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .carousel-container {
        padding: 0 40px;
    }

    .trainers-section h2 {
        font-size: 1.5rem;
    }

    .trainers-section .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .trainer-card {
        padding: 15px;
    }

    .trainer-card h4 {
        font-size: 1.3rem;
    }

    .trainer-specialty span {
        font-size: 1.05rem;
    }

    .trainer-location,
    .trainer-features li {
        font-size: 1.15rem;
    }

    .review-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 767px) {
    .carousel-container {
        padding: 0 15px;
    }

    .card-carousel-section h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .trainer-card h4 {
        font-size: 1.1rem;
    }

    .trainer-specialty span {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .trainer-location,
    .trainer-features li {
        font-size: 0.85rem;
    }

    .review-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
        min-height: 400px;
    }

    .carousel-control-prev {
        width: 30px;
        height: 30px;
        left: -20px;
    }

    .carousel-control-next {
        width: 30px;
        height: 30px;
        right: -20px;
    }
}

@media (max-width: 767px) {
    .review-card {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 10px;
    }

    .review-img-container {
        height: 150px;
    }

    .review-card h5 {
        font-size: 0.9rem;
    }

    .review-card p {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.trainer-tags span {
    background-color: #f0f0f0;
    color: #495057;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    transition: all 0.2s ease;
    font-weight: 500;
}
.detail-btn {
    margin-top: auto;
    margin-bottom: 15px; /* 원하는 하단 여백 설정 */
}