/* ==========================================================================
   Detail Pages Styles (Service / Article)
   ========================================================================== */

.detail-page {
    padding: 40px 0 80px;
}

.detail-page .page-hero {
    margin-bottom: 0;
}

/* Shared detail layout */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    align-items: start;
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: 120px;
}

.detail-cover {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--card-shadow);
}

.detail-cover img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.detail-cover-badge {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-meta i {
    color: var(--primary-color);
}

.detail-body {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
}

.detail-body p {
    margin-bottom: 1.15rem;
}

.detail-body h2,
.detail-body h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin: 1.8rem 0 0.9rem;
}

.detail-body h2 {
    font-size: 1.45rem;
}

.detail-body h3 {
    font-size: 1.2rem;
}

.detail-body ul {
    margin: 0 0 1.2rem;
    padding-inline-start: 1.25rem;
}

.detail-body li {
    margin-bottom: 0.55rem;
}

.detail-body blockquote {
    margin: 1.5rem 0;
    padding: 18px 22px;
    border-inline-start: 4px solid var(--primary-color);
    background: rgba(var(--primary-rgb), 0.06);
    border-radius: 0 14px 14px 0;
    color: var(--text-primary);
    font-weight: 500;
}

html[dir="rtl"] .detail-body blockquote {
    border-radius: 14px 0 0 14px;
}

/* Service specs cards */
.service-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 28px 0;
}

.service-spec-card {
    padding: 20px;
    border-radius: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.service-spec-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-spec-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.service-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0 32px;
}

.service-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid transparent;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.service-feature:hover {
    border-color: rgba(var(--primary-rgb), 0.25);
    transform: translateY(-2px);
}

.service-feature i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-feature h5 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

.service-feature p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Sidebar widgets */
.detail-widget {
    padding: 22px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.detail-widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 14px;
}

.related-list li:last-child {
    margin-bottom: 0;
}

.related-item {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.related-item:hover {
    transform: translateX(-3px);
}

html[dir="ltr"] .related-item:hover {
    transform: translateX(3px);
}

.related-item img {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.related-item h5 {
    margin: 0 0 4px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.related-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-cta {
    text-align: center;
    background: linear-gradient(170deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
}

.detail-cta .detail-widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.detail-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.detail-cta .btn-outline-custom {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff !important;
    width: 100%;
    justify-content: center;
}

.detail-cta .btn-outline-custom:hover {
    background: #fff;
    color: var(--primary-color) !important;
    border-color: #fff;
}

.detail-cta .btn-primary-custom {
    background: #fff;
    color: var(--primary-color) !important;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: none;
}

.detail-cta .btn-primary-custom:hover {
    background: rgba(255, 255, 255, 0.92);
}

/* Article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-tag:hover {
    background: var(--primary-color);
    color: #fff;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.article-share span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.article-share a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.article-share a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Article FAQ Accordion */
.article-faq {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.article-faq-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.active {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.08);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.98rem;
    text-align: start;
    cursor: pointer;
    font-family: inherit;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0 18px;
}

.faq-item.active .faq-answer {
    max-height: 240px;
    padding: 0 18px 16px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.75;
}

/* Sidebar inquiry form */
.sidebar-inquiry-form .calc-label {
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.sidebar-inquiry-form .calc-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.sidebar-inquiry-form textarea.calc-input {
    resize: vertical;
    min-height: 96px;
}

.sidebar-inquiry-form .btn-primary-custom {
    margin-top: 4px;
    padding: 11px 16px;
    font-size: 0.92rem;
}

/* Responsive */
@media (max-width: 991px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .detail-sidebar {
        position: static;
    }

    .detail-cover img {
        height: 280px;
    }

    .service-specs,
    .service-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .detail-page {
        padding: 24px 0 70px;
    }

    .detail-cover img {
        height: 220px;
    }

    .detail-body {
        font-size: 0.98rem;
    }
}
