/* Service Details Page - Sidebar Alignment Fixes */

/* Force row to align items at the top */
section.service-details .container > .row {
    display: flex !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

section.service-details {
    overflow: visible !important;
}

/* CRITICAL: Remove ALL spacing from sidebar and its children */
section.service-details .col-lg-4 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-self: flex-start !important;
    float: none !important;
}

section.service-details .col-lg-8 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-self: flex-start !important;
    float: none !important;
}

section.service-details .rs-service-details__sidebar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

section.service-details .rs-service-details__sidebar *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove ALL spacing from common boxes at the top */
section.service-details .rs-service-details__sidebar .common-box {
    margin-top: 0 !important;
}

section.service-details .rs-service-details__sidebar .common-box:first-child {
    margin-top: 0 !important;
}

section.service-details .rs-service-details__sidebar > div:first-child {
    margin-top: 0 !important;
}

section.service-details .rs-service-details__sidebar .rs-sidebar-category-box {
    margin-top: 0 !important;
}

section.service-details .rs-service-details__sidebar .rs-sidebar-category-box:first-child {
    margin-top: 0 !important;
}

/* Service details content wrapper */
.service-details-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Service thumb (image container) */
.service-thumb {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.service-thumb.mb-40 {
    margin-top: 0 !important;
}

/* Service Details Content */
.service-details-content {
    margin-bottom: 40px;
}

.service-details-content .service-thumb {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.service-details-content .service-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Service List Styling */
.service-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.service-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #333;
}

.service-list li i {
    color: #007bff;
    margin-right: 10px;
    font-size: 18px;
}

/* Feature Box Styling */
.feature-box {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.15);
}

.feature-box h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.feature-box p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* CTA Box Styling */
.cta-box {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.cta-box h3 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

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

.cta-box .main-btn {
    background: white;
    color: #007bff;
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cta-box .main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Sidebar Widgets Spacing */
.rs-service-details__sidebar .common-box {
    margin-bottom: 30px;
}

/* Add spacing ONLY between widgets, not at the top */
.rs-service-details__sidebar .common-box + .common-box {
    margin-top: 30px !important;
}

/* Active Service Link Styling */
.rs-sidebar-category-box ul li a.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4) !important;
    border-left: 4px solid #0056b3 !important;
    transform: translateX(5px) !important;
    transition: all 0.3s ease !important;
}

.rs-sidebar-category-box ul li a.active:hover {
    transform: translateX(8px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5) !important;
}

.rs-sidebar-category-box ul li a.active i {
    color: #ffffff !important;
    font-weight: bold !important;
    transform: scale(1.2) !important;
}

/* Responsive Design */
@media (max-width: 991px) {
    .rs-service-details__sidebar {
        margin-top: 50px !important;
    }

    .service-details .col-lg-4 {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .cta-box {
        padding: 30px 20px;
    }

    .cta-box h3 {
        font-size: 20px;
    }

    .feature-box {
        padding: 20px;
    }
}
