.caption-content {
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 22px;
    background: #faf9ff;
    box-shadow: 0px 16px 15px 1px rgba(0, 0, 0, 0.06);
}

.caption-search {
    padding: 0.5rem;
    width: 100%;
    max-width: 750px;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}


.service-explain-graphic-caption{
    width: 90%;
    max-width: 250px;
}

.caption-input-wrap .inspiration-input-wrap {
    width: 100%;
}

.search-input {
    width: 100%;
    min-height: 2rem;  
    max-height: 4rem;     
    padding: 14px 16px;
    font-size: 0.8rem;
    line-height: 1.5;
    border-radius: 10px;
    border: 0px;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    resize: none;           
    white-space: pre-wrap;   
    overflow-y: auto;   
}



.search-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modes {
    display: flex;
    gap: 10px;
}

.mode-btn {
    padding-bottom: 0.8rem;
    padding-top: 0.8rem;
    padding-left: 1.3rem;
    padding-right: 1.3rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.mode-btn.active,
.mode-btn:hover {
    background: white;
    box-shadow: 3px 13px 13px 0px rgba(0, 0, 0, 0.06);
}

.search-btn {
    padding: 10px 20px;
    background: #7b4bff;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.search-btn:hover {
    background: #6a3de0;
}


.service-explain-caption {
    margin-top: 5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 5rem;
    width: 100%;
}

/* Enhance anlysis results */
.enhance-results {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#enhance-results {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#enhance-results.show {
    display: block;
    opacity: 1;
}


.suggested-captions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
}

.section-title{
    font-size: 1.5rem;
    font-weight: 700;
    color: #220041;
}

.caption-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: #4a3e57;
    font-size: 1rem;
    line-height: 1.2;
}

.caption-item {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}


.explanations {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: flex-start;
    margin-top: 2rem;
    width: 100%;
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem; /* space between cards */
    width: 100%;
}

.explanation-card {
    background: white;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    box-shadow: 0px 13px 13px rgba(0, 0, 0, 0.06);
    transition: 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    max-width: 400px; /* optional max width */
}

.explanation-card:hover {
    transform: translateY(-2px);
}

.exp-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #240046;
}

.exp-text {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #4a3e57;
    line-height: 1.5;
}

/* Optional: better spacing on small screens */
@media screen and (max-width: 600px) {
    .explanation-grid {
        grid-template-columns: 1fr; /* single column on mobile */
        gap: 0.8rem;
    }
}
