/* ==========================================
   WIDGET CORE LAYOUT & STRUCTURE
   ========================================== */
.custom-services-wrapper { 
    display: flex; 
    width: 100%; 
    background: #ffffff; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    overflow: hidden; 
    font-family: inherit; 
    box-sizing: border-box; 
}
.custom-services-wrapper * { box-sizing: border-box; }

/* Left Sidebar */
.services-sidebar { 
    width: 270px; 
    background: #faf9f6; 
    border-right: 1px solid #e5e7eb; 
    padding: 30px 0; 
    flex-shrink: 0; 
}
.services-sidebar-title { 
    margin-top: 0; 
    margin-bottom: 25px; 
    padding: 0 20px; 
    letter-spacing: -0.5px; 
    font-size:24px;
}
.tab-nav-list { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
    width: 100%; 
    border-top: 1px solid #e5e7eb; 
    padding-top:0.5rem;
}

/* Navigation Items (Default State) */
.tab-nav-item { 
    background: transparent; 
    border: none; 
    padding: 14px 20px; 
    text-align: left; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    transition: all 0.2s ease; 
    border-radius: 0; 
    width: 100%;
    font-size:18px;
}
.tab-nav-item i { 
    width: 24px; 
    text-align: center; 
}

/* Navigation Items - Hover State */
.tab-nav-item:hover, .tab-nav-item:focus { 
    background-color: var(--hover-bg, #8D2D1E) !important; 
    color: var(--hover-color, inherit) !important;
}
.tab-nav-item:hover i {
    color: var(--hover-color, inherit) !important;
}

/* Navigation Items - Active State */
.tab-nav-item.active { 
    background-color: var(--active-bg, #8D2D1E) !important; 
    color: var(--active-color, #ffffff) !important;
    font-weight: 600; 
}
.tab-nav-item.active i {
    color: var(--active-color, #ffffff) !important;
}

/* Right Content Area */
.services-content-area { 
    flex: 1; 
    background: #ffffff; 
    padding: 45px; 
    min-width: 0; 
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease-in-out; }

/* Content Elements Styling */
.content-number { 
    display: block; 
    margin-bottom: 8px; 
    font-size:18px;
    font-weight:700;
}
.content-title { 
    margin: 0 0 24px 0; 
    line-height: 1.3; 
    border-left: 3px solid #992b19; 
    padding-left: 15px; 
    font-size:32px;
}
.content-body { 
    line-height: 1.7; 
    margin-bottom: 35px; 
}
.content-body p { margin: 0 0 15px 0; }

/* Disclaimer / Footer Box */
.content-footer-box { 
    background: #faf8f5; 
    border-left: 3px solid #b48a56; 
    padding: 16px 20px; 
    border-radius: 0 4px 4px 0; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE STYLES (Tablet & Mobile < 768px)
   ========================================== */
@media screen and (max-width: 768px) {
    .custom-services-wrapper { flex-direction: column; width: 100% !important; }
    .services-sidebar { width: 100% !important; border-right: none; border-bottom: 1px solid #e5e7eb; padding: 20px 0; }
    .services-sidebar-title { margin-bottom: 15px; padding: 0 15px; text-align:center;}
    
    /* Updated to wrap items instead of horizontal scrolling */
    .tab-nav-list { 
        flex-direction: row; 
        flex-wrap: wrap; 
        overflow-x: visible; 
        gap: 8px; 
        padding: 0 15px; 
        border-top: 1px solid #e5e7eb; 
        padding-top:0.75rem;
        justify-content: center;
    }
    
    .tab-nav-item { 
        white-space: normal; 
        width: auto !important; 
        padding: 10px 14px; 
        flex-shrink: 0;
        border-radius: 4px !important;
        border:1px solid #e5e7eb;
        font-size:16px;
    }
    
    .services-content-area { padding: 25px 20px; width: 100% !important; }
}