/**
 * Styles for mod_ob_works Accordion Module
 */

.ob-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.ob-accordion-wrapper *,
.ob-accordion-wrapper *::before,
.ob-accordion-wrapper *::after {
    box-sizing: border-box;
}

.ob-accordion-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ob-accordion-item:hover {
    border-color: #cbd5e1;
}

.ob-accordion-item.is-active {
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.ob-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ob-accordion-header:hover {
    background-color: #f8fafc;
}

.ob-accordion-header:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.ob-header-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.ob-accordion-title {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ob-accordion-header.is-active .ob-accordion-title {
    color: #2563eb;
}

.ob-accordion-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.825rem;
    font-weight: 500;
    color: #64748b;
}

.ob-date-icon {
    flex-shrink: 0;
    opacity: 0.75;
}

.ob-accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
}

.ob-accordion-header:hover .ob-accordion-icon {
    background-color: #e2e8f0;
    color: #334155;
}

.ob-accordion-header.is-active .ob-accordion-icon {
    transform: rotate(180deg);
    background-color: #eff6ff;
    color: #2563eb;
}

.ob-accordion-collapse {
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ob-accordion-body {
    padding: 0 20px 20px 20px;
    color: #334155;
    font-size: 0.975rem;
    line-height: 1.65;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.ob-accordion-body p:last-child {
    margin-bottom: 0;
}

.ob-accordion-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .ob-accordion-header {
        padding: 14px 16px;
    }
    .ob-accordion-body {
        padding: 0 16px 16px 16px;
        padding-top: 14px;
    }
    .ob-accordion-title {
        font-size: 0.98rem;
    }
}
