/**
 * Category Guide Plugin Styles
 * RTL & Responsive Native
 */

.category-guide-wrapper {
    margin-top: 45px;
    margin-bottom: 35px;
    clear: both;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.category-guide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 26px 30px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    position: relative;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
}

.category-guide-content-wrapper {
    position: relative;
    max-height: 290px;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-guide-content-wrapper.is-expanded {
    max-height: none !important;
}

.category-guide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 95px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 65%, #ffffff 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.category-guide-content-wrapper.is-expanded .category-guide-overlay {
    opacity: 0;
    display: none;
}

.category-guide-actions {
    text-align: center;
    margin-top: 14px;
    position: relative;
    z-index: 2;
}

.category-guide-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 9999px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.category-guide-toggle-btn:hover {
    background: #4361ee;
    color: #ffffff;
    border-color: #4361ee;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.25);
}

.category-guide-toggle-btn .toggle-icon {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.category-guide-toggle-btn:hover .toggle-icon svg {
    stroke: #ffffff;
}

/* Typography Inside Guide Body */
.category-guide-body {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #334155;
}

.category-guide-body h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 14px;
    line-height: 1.4;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

.category-guide-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 18px;
    margin-bottom: 10px;
}

.category-guide-body h4 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #334155;
    margin-top: 14px;
    margin-bottom: 8px;
}

.category-guide-body p {
    margin-bottom: 14px;
    text-align: justify;
}

.category-guide-body ul,
.category-guide-body ol {
    padding-right: 24px;
    margin-bottom: 16px;
}

.category-guide-body li {
    margin-bottom: 6px;
    line-height: 1.75;
}

.category-guide-body strong,
.category-guide-body b {
    color: #0f172a;
    font-weight: 700;
}

.category-guide-body a {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s;
}

.category-guide-body a:hover {
    color: #1d4ed8;
}

/* Table styling if any */
.category-guide-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.category-guide-body th,
.category-guide-body td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: right;
}

.category-guide-body th {
    background: #f8fafc;
    font-weight: 700;
}

@media (max-width: 768px) {
    .category-guide-card {
        padding: 20px 18px;
        border-radius: 12px;
    }

    .category-guide-body h2 {
        font-size: 1.2rem;
    }

    .category-guide-body h3 {
        font-size: 1.05rem;
    }

    .category-guide-toggle-btn {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
}
